/* Mobile ergonomics shared by the studio, library and public feed. */
@media(max-width:700px){
html{scroll-padding-top:100px}
body{overflow-wrap:break-word}
.page-wrap{width:calc(100% - 28px);max-width:100%;box-sizing:border-box}
.nav-wrap{flex-wrap:wrap;gap:10px;padding:10px 14px}
.main-nav{order:3;width:100%;display:flex;overflow-x:auto;gap:8px;white-space:nowrap}
.main-nav .nav-link{flex:1;text-align:center;min-height:44px;display:grid;place-items:center;padding:0 10px}
input:not([type=checkbox]):not([type=radio]),textarea,select{font-size:16px!important}
button,.button,select{touch-action:manipulation}
.button,.icon-button{min-height:44px}
.workspace-heading{align-items:flex-start;gap:12px;flex-wrap:wrap;padding:18px 0}
.workspace-heading .eyebrow{display:none}
.workspace-heading h1{font-size:24px}
.workspace-heading-actions{flex-wrap:wrap;gap:8px}
.workspace-subnav{flex-wrap:wrap;gap:10px}
.toon-studio-grid{display:flex;flex-direction:column;gap:18px}
.story-sidebar,.toon-stage{width:100%;min-width:0;box-sizing:border-box;position:static}
.story-sidebar{padding:16px}
.studio-resume{padding:14px}
.recent-projects{display:flex;overflow-x:auto;scroll-snap-type:x proximity}
.recent-projects>*{min-width:240px;scroll-snap-align:start}
.stage-toolbar{flex-wrap:wrap;padding:12px;gap:10px}
.stage-steps{width:100%;justify-content:space-between;gap:4px}
.stage-step{font-size:12px;min-height:44px}
.comic-panel-grid{grid-template-columns:minmax(0,1fr)}
.script-actions,.download-actions,.project-story-actions{flex-wrap:wrap;gap:10px}
.script-actions>.button,.download-actions>.button{flex:1 1 150px;white-space:normal}
.toon-editor-dialog{width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;margin:0!important;border-radius:0!important;padding:0!important}
.editor-header{padding:10px 12px;flex-wrap:wrap;gap:8px}
.editor-header-actions{flex-wrap:wrap;gap:6px}
.editor-workbench{display:flex!important;flex-direction:column;overflow-y:auto;min-height:0}
.editor-tools{display:flex;flex-direction:row;overflow-x:auto;flex-shrink:0;padding:8px;gap:6px}
.editor-tool{min-width:44px;min-height:44px}
.editor-center{min-height:300px;flex:none}
.editor-canvas-wrap{min-height:260px;max-height:55dvh}
.editor-inspector{width:100%!important;max-height:none!important;overflow:visible!important;box-sizing:border-box;padding:16px}
.editor-bottom-actions{padding-bottom:max(12px,env(safe-area-inset-bottom))}
.library-heading{display:block;padding:24px 0}
.library-heading h1{font-size:28px}
.library-heading>.button{width:100%;margin-top:16px;box-sizing:border-box}
.library-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.library-stat{padding:14px;min-width:0}
.library-shortcuts{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:8px;padding:8px 0;scroll-snap-type:x proximity}
.library-shortcuts a{flex-shrink:0;min-height:44px;display:flex;align-items:center;padding:0 12px;scroll-snap-align:start}
.library-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.library-search{grid-column:1/-1}
.library-select,.library-select select{min-width:0;width:100%}
.library-grid{grid-template-columns:minmax(0,1fr)}
.community-layout{display:block;padding-top:16px}
.community-sidebar{position:static;margin-top:24px}
.community-tabs{gap:20px;margin-top:0}
.community-tabs button{min-height:48px;padding-bottom:10px}
.community-view-toggle button,.community-reader-arrow{width:44px;height:44px}
.community-card-header{padding:12px;gap:8px}
.community-card-body{padding:14px}
.community-card-actions{flex-wrap:wrap}
.community-action{min-height:44px;font-size:13px}
.community-card-caption{font-size:14px;line-height:1.75}
.community-feed.is-grid{gap:10px}
.community-feed.is-grid .community-card-header{flex-wrap:wrap}
.community-feed.is-grid .community-card-badge{display:none}
.community-feed.is-grid .community-card-actions{flex-direction:column;align-items:flex-start}
.community-reader-controls{flex-wrap:wrap;gap:4px}
.community-dot{min-width:28px;min-height:32px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* Auth feedback stays adjacent to consent and sign in. */
.auth-form-inner #auth-message{position:sticky;top:12px;z-index:5;scroll-margin-top:120px;border-width:2px}
.auth-form-inner .check-row{padding:14px;border:1px solid var(--line);border-radius:12px;align-items:flex-start;margin:16px 0 10px;cursor:pointer;line-height:1.7}
.auth-form-inner .check-row input{width:22px;height:22px;flex-shrink:0;margin-top:2px;accent-color:var(--accent)}
.auth-method-tabs{padding:3px!important;margin-top:18px!important}
.auth-method-tabs button{min-height:40px!important;padding:8px 12px!important;font-size:12px!important}
@media(max-width:760px){
.main-nav{display:none!important}
.auth-scene{display:none!important}
.auth-form-panel{padding:24px 18px!important}
.auth-form-inner #auth-message{top:8px}
}

.benefit-chips{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}
.benefit-chips span{padding:8px 12px;border:1px solid var(--line);border-radius:8px;font-size:13px}
@media(max-width:760px){
.manual-editor-feature.journey-edit{padding:20px 16px;margin-top:16px;gap:16px}
.journey-edit h2{font-size:24px;line-height:1.35}
.editor-feature-pills{display:none}
.benefit-chips{gap:6px;margin:12px 0}
.benefit-chips span{font-size:12px;padding:7px 9px}
.journey-edit-comparison{gap:10px}
.journey-edit-comparison>p{display:none}
.editor-feature-note{font-size:12px!important;line-height:1.6!important}
}

.community-card{border-radius:0!important;box-shadow:none!important;border-left:0!important;border-right:0!important}
.community-official-badge{display:inline-grid!important;place-items:center!important;background:#3196ef!important;color:white!important;border:0!important;border-radius:50%!important;width:18px!important;height:18px!important;padding:0!important;font-size:12px!important;line-height:1!important;clip-path:polygon(50% 0,62% 8%,75% 7%,82% 20%,95% 27%,93% 42%,100% 50%,93% 62%,95% 75%,82% 82%,75% 95%,62% 93%,50% 100%,38% 93%,25% 95%,18% 82%,5% 75%,7% 62%,0 50%,7% 38%,5% 25%,18% 18%,25% 5%,38% 7%)}
.community-avatar-official{background:radial-gradient(circle at 25% 20%,#daf6ae,#84b2d8 55%,#9676cf)!important;color:#18302f!important;border:2px solid #ffffff40!important}
.community-reader-controls{justify-content:space-between!important}
.community-format-label{font-size:11px;color:var(--muted)}
.email-auth-divider{text-align:center;font-size:12px;color:var(--muted);margin:20px 0}
#email-auth-message{position:sticky;top:8px;z-index:3}
#email-code-submit{margin-top:18px}
#email-code-step{margin-top:16px}
@media(max-width:760px){.community-page{width:100%!important}.community-main>.community-tabs,.community-section-heading{padding-left:14px;padding-right:14px}.community-card{border-radius:0!important}.community-feed{gap:18px}.community-compact-sidebar{margin-left:14px;margin-right:14px}}

.community-official-badge:before{content:none!important}
@media(max-width:760px){.community-stream .community-tabs{padding-inline:14px}}

.guide-page{max-width:840px;padding-top:36px;padding-bottom:48px;line-height:1.85}.guide-page h1{font-size:32px;line-height:1.3}.guide-page h2{font-size:21px;margin-top:28px}.guide-page li{padding-left:8px}.guide-page a{color:var(--accent)}
