/* Homepage and save-label refinement. Scene data and editor geometry stay untouched. */
body:not(.editing)>header{height:56px;padding:0 max(24px,calc((100vw - 1200px)/2))}
#welcome{width:100%;max-width:1248px;margin:0 auto;padding:14px 24px 28px}
#welcome .home-nav{margin-bottom:8px;min-width:0;font-size:11px}
#welcome .scene-start-heading{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:36px;padding:0 0 12px;align-items:center}
#welcome .home-intro{min-width:0}
#welcome .scene-start h1{font-size:clamp(28px,2.8vw,36px);line-height:1.35;letter-spacing:-.8px;margin:8px 0 10px}
#welcome .scene-start-heading p{font-size:13px;line-height:1.7}
#welcome .scene-start-actions{display:block;max-width:none;margin:14px 0 0}
#welcome .scene-start-actions>div{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:8px;flex-wrap:wrap}
#welcome .scene-start-actions button{font-size:12px;padding:9px 14px;min-height:38px;white-space:nowrap}
#welcome .scene-start-actions #new-scene-summary{display:block;text-align:left;font-size:10px;margin:8px 0 0;line-height:1.6;flex-basis:auto}
#welcome .home-feature{display:block;position:relative;width:100%;padding:0;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--panel);text-align:left}
#welcome .home-feature img{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:cover}
.home-feature-play{position:absolute;top:12px;left:12px;padding:6px 10px;background:#faf7efed;color:#322a20;border-radius:20px;font-size:11px}
.home-feature-caption{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px;font-size:12px;font-weight:600}
.home-feature-caption small{font-size:10px;color:var(--muted);font-weight:400}
#welcome .home-steps{margin:0;padding:8px 0;gap:24px}
#welcome .home-steps li{gap:10px;font-size:11px;line-height:1.6}
#welcome .home-steps strong{display:inline;font-size:12px;margin-right:8px}
#welcome .starter-examples{padding-top:16px}
#welcome .template-heading{margin-bottom:12px}
#welcome .template-heading h2{font-size:18px}
#welcome .template-filter{margin-bottom:14px}
#welcome #template-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:auto;gap:18px;align-items:stretch}
#welcome .template-card{display:flex;grid-row:auto;min-width:0;height:auto}
#welcome .template-card-inner{display:flex;flex-direction:column;width:100%;height:100%;border-radius:10px}
#welcome .template-poster,#welcome .template-poster.portrait{height:clamp(140px,11.5vw,155px);aspect-ratio:auto;flex:none}
#welcome .template-poster img{object-fit:contain}
#welcome .template-card-content{display:flex;flex-direction:column;flex:1;padding:10px 14px}
#welcome .template-card-content h3{display:flex;align-items:baseline;justify-content:space-between;gap:8px;min-height:23px;margin:0 0 5px;font-size:14px;line-height:1.6}
#welcome .template-card-content h3 button{min-width:0;overflow-wrap:anywhere}
.template-beginner{flex:none;border:1px solid var(--line);padding:1px 6px;border-radius:4px;color:var(--accent);font-size:10px;white-space:nowrap}
#welcome .template-meta{font-size:11px;margin-bottom:6px}
#welcome .template-purpose{min-height:28px;margin-bottom:10px;font-size:11px;line-height:1.5}
#welcome .template-card-actions{margin-top:auto;gap:8px;flex-wrap:nowrap}
#welcome .template-card-actions button{white-space:nowrap;word-break:keep-all;flex:none;min-height:34px;font-size:11px}
#welcome .home-notes{margin-top:28px;padding-top:26px;gap:40px}
body.editing>header #save{width:auto;min-width:32px;display:flex;align-items:center;gap:5px;padding:0 8px}
body.editing>header #save::after{content:'备份';font-size:11px}
@media(max-width:960px){#welcome .scene-start-heading{grid-template-columns:minmax(0,1fr) 240px;gap:20px}#welcome .scene-start h1{font-size:29px}#welcome .home-steps strong{display:block}#welcome #template-options{grid-template-columns:repeat(2,minmax(0,1fr))}#welcome .template-poster,#welcome .template-poster.portrait{height:185px}}
@media(max-width:700px){#welcome{padding:16px 16px 24px}#welcome .home-nav{margin-bottom:20px}#welcome .scene-start-heading{display:block}#welcome .home-feature{display:none}#welcome .scene-start h1{font-size:30px}#welcome .scene-start h1 em{display:block}#welcome .scene-start-actions>div{display:flex}#welcome .scene-start-actions .home-quick-start{flex:1}#welcome .home-steps{grid-template-columns:1fr;gap:8px}#welcome .home-steps strong{display:inline}#welcome .template-heading{align-items:flex-start}#welcome .template-heading h2{font-size:17px}#welcome .template-heading p{max-width:130px;font-size:10px}#welcome #template-options{grid-template-columns:1fr;gap:16px}#welcome .template-poster,#welcome .template-poster.portrait{height:auto;aspect-ratio:16/9}#welcome .template-purpose{min-height:0}#welcome .template-card-actions button{min-height:40px;font-size:12px}#welcome .home-notes{gap:20px}body:not(.editing)>header{display:flex;flex-wrap:nowrap;padding:0 16px}body:not(.editing)>header .brand{width:auto;flex:0 0 auto}body:not(.editing)>header .header-actions{display:flex;margin-left:auto}body.editing>header #save::after{display:none}body.editing>header #save{width:32px;padding:0}}
@media print{
 @page{size:A4;margin:12mm}
 html,body:not(.editing){height:auto!important;min-height:0!important;overflow:visible!important;width:100%!important;min-width:0!important;background:#fff!important;color:#222!important}
 body:not(.editing)>header{height:auto;padding:0 0 5mm;border-bottom:1px solid #ccc}
 body:not(.editing)>header .header-actions,.home-nav,.home-feature,.scene-start-actions,.template-filter,.template-play,.template-card-actions,#home-ad-placement{display:none!important}
 #welcome{display:block!important;width:100%!important;max-width:none!important;margin:0!important;padding:5mm 0!important}
 #welcome .scene-start{width:100%!important;max-width:none!important;padding:0!important}
 #welcome .scene-start-heading{display:block;padding-bottom:4mm}
 #welcome .scene-start h1{font-size:22pt;margin:0 0 3mm}
 #welcome .scene-start-heading p{font-size:10pt}
 #welcome .home-steps{grid-template-columns:repeat(3,1fr);padding:3mm 0}
 #welcome .starter-examples{margin-top:0;padding-top:4mm}
 #welcome .template-heading h2{font-size:14pt}
 #welcome #template-options{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-auto-rows:auto!important;gap:5mm!important}
 #welcome .template-card{display:block!important;grid-row:auto!important;break-inside:avoid;page-break-inside:avoid;height:auto!important}
 #welcome .template-card[hidden]{display:none!important}
 #welcome .template-card-inner{height:auto!important;border:1px solid #bbb;box-shadow:none}
 #welcome .template-poster,#welcome .template-poster.portrait{height:40mm!important;aspect-ratio:auto!important}
 #welcome .template-card-content{padding:3mm}
 #welcome .template-card-content h3{font-size:11pt}
 #welcome .template-meta,#welcome .template-purpose{font-size:9pt;line-height:1.6;min-height:0}
 #welcome .template-category,#welcome .template-duration{font-size:8pt}
 #welcome .home-notes,#welcome .home-faq{break-inside:avoid;page-break-inside:avoid}
 #welcome .gallery-foot{font-size:8pt;break-inside:avoid}
}

/* Guide entry is scoped to the welcome screen. */
#welcome .home-guide-entry{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:9px 14px;border:1px solid var(--accent);border-radius:5px;font-size:12px;font-weight:600;color:var(--accent);text-decoration:none;white-space:nowrap}
#welcome .home-guide-feature{color:var(--text);text-decoration:none}#welcome .home-guide-feature:hover{border-color:var(--accent)}
#welcome .home-guide-feature img{height:146px;object-fit:cover}
#welcome .fizzi-start{display:flex;align-items:center;gap:16px;padding:16px;margin:0 0 14px;border:1px solid var(--accent);border-radius:8px;background:var(--panel)}
#welcome .fizzi-start[hidden]{display:none}#welcome .fizzi-start div{flex:1}#welcome .fizzi-start b{display:block;font-size:14px}#welcome .fizzi-start span{display:block;margin-top:5px;font-size:11px;color:var(--muted)}#welcome .fizzi-start button{background:var(--primary);color:var(--button-text);font-size:12px;white-space:nowrap}#welcome .fizzi-start a{font-size:11px;color:var(--muted);white-space:nowrap}
@media(max-width:700px){#welcome .home-guide-entry{flex:1}#welcome .home-nav>div{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}#welcome .home-nav>span{max-width:105px;flex:none}#welcome .fizzi-start{flex-wrap:wrap}#welcome .fizzi-start div{flex-basis:100%}#welcome .home-guide-feature{display:none}}
@media print{.home-guide-entry,.fizzi-start{display:none!important}}
