/* User-approved 55AI typography. Local unmodified fonts; SIL OFL copies in fonts/. */
@font-face{font-family:"Hanken Grotesk";src:url("fonts/HankenGrotesk.ttf") format("truetype");font-weight:100 900;font-style:normal;font-display:swap}
@font-face{font-family:"Source Serif 4";src:url("fonts/SourceSerif4.ttf") format("truetype");font-weight:200 900;font-style:normal;font-display:swap}
@font-face{font-family:"JetBrains Mono";src:url("fonts/JetBrainsMono.ttf") format("truetype");font-weight:100 800;font-style:normal;font-display:swap}
/* Numeric glyphs keep the requested mono face even inside mixed Chinese UI labels. */
@font-face{font-family:"Workspace Digits";src:url("fonts/JetBrainsMono.ttf") format("truetype");font-weight:100 800;font-style:normal;font-display:swap;unicode-range:U+0030-0039}
:root{
  --font-body:"Workspace Digits","Hanken Grotesk","PingFang SC","Microsoft YaHei",sans-serif;
  --font-heading:"Workspace Digits","Source Serif 4","Songti SC","STSong","SimSun",serif;
  --font-mono:"JetBrains Mono","PingFang SC",ui-monospace,monospace;
  font-family:var(--font-body);
}
h1,h2,h3,.brand-name{font-family:var(--font-heading);font-weight:600;font-optical-sizing:auto;letter-spacing:0}
code,pre,kbd,.mono,[data-field="aspect"],[data-field="duration"],#brief-count{font-family:var(--font-mono);font-variant-numeric:tabular-nums}
button,input,textarea,select{font-family:var(--font-body)}
/* 1555×853 reference viewport: 72px rail, 840×146 composer, 12px studio gutters. */
.sidebar{width:72px;padding:16px 8px}
.brand{width:40px;height:40px;margin-bottom:24px;border-radius:12px}
.brand svg{width:23px;height:23px}
.nav{gap:12px}
.nav button{min-height:56.5px;padding:7px 2px;gap:6px;font-size:11px;border-radius:9px}
.nav button svg{width:21px;height:21px}
.sidebar-bottom{gap:15px}
.credits{font-size:10px;padding:9px 2px}
.credits strong{font-size:12px}
.main-wrap{margin-left:72px}
.topbar{height:64px;padding:0 36px;background:transparent;border:0}
.brand-name{font-size:18px}
.topbar .caption{font-size:11px}
.topbar-actions .avatar{display:none}
main{min-height:calc(100vh - 64px)}
.home{max-width:none;padding:32px 60px 30px}
.welcome{margin-bottom:34px}
.welcome h1{font-size:30px;line-height:36px}
.welcome p{font-size:14px;line-height:20px;margin-top:10px}
.composer{width:100%;max-width:840px;min-height:146px;padding:10px;border-radius:20px}
.compose-input{gap:20px;align-items:flex-start}
.add-tile{height:70px;width:74px;margin-left:4px;font-size:11px;white-space:nowrap}
.compose-input textarea{min-height:82px;height:82px;padding:5px 8px;font-size:14px;line-height:26px}
.composer .file-list:empty{display:none}
.compose-bottom{margin-top:8px}
.compose-bottom .primary{min-height:34px;padding:6px 13px;font-size:13px}
.compose-bottom select{font-size:13px;padding:6px 9px}
.tool-strip{max-width:840px;margin:48px auto 64px;display:grid;grid-template-columns:repeat(6,1fr);gap:0}
.tool-item{font-size:14px;gap:12px;line-height:24px;padding:0}
.tool-item>span{width:48px;height:48px;border-radius:14px}
.tool-item svg{width:23px;height:23px}
.section-heading{margin-bottom:16px}
.section-heading h2{font-size:20px;line-height:28px}
.scenes{display:grid;grid-auto-flow:column;grid-auto-columns:280px;grid-template-columns:none;gap:24px;overflow-x:auto;scroll-snap-type:x proximity;padding-bottom:12px;margin-bottom:26px}
.scene{padding:0;min-height:198px;overflow:hidden;scroll-snap-align:start;display:flex;flex-direction:column}
.scene-media{display:grid;place-items:center;width:100%;height:142px;background:#f0e8dd;color:#aa795e;overflow:hidden}
.scene-media img{width:100%;height:100%;object-fit:cover}
.scene-media svg{width:38px;height:38px;margin:0;stroke-width:1.2}
.scene-info{display:flex;align-items:center;gap:12px;min-height:56px;padding:12px 16px;width:100%}
.scene strong{font-size:14px;white-space:nowrap}
.scene small{font-size:11px;margin:0;line-height:1.6;white-space:normal;text-align:left}
.reference-img{aspect-ratio:1.8}
.main-wrap[data-view="video"]>.topbar{display:none}
.main-wrap[data-view="video"] main{min-height:100vh}
.studio{max-width:none;height:100vh;padding:24px 36.5px;gap:12px;grid-template-columns:minmax(464px,.51fr) minmax(0,1fr) clamp(160px,11vw,196px);align-items:stretch}
.studio>.panel{height:100%;min-height:0;overflow:auto;border-radius:16px}
.input-panel{padding:18px}
.input-panel .panel-heading{margin-bottom:15px;padding-bottom:14px}
.input-panel .field-title{margin-top:16px}
.input-panel textarea{height:128px}
.input-panel .input-actions{margin-top:14px}
.input-panel .upload-area{padding:22px 8px}
.work-panel>.panel-heading{padding:17px 20px}
.panel-heading h2{font-size:18px}
.editor{display:flex;flex-direction:column;min-height:0;padding:0 20px 18px}
.editor textarea{flex:1;min-height:200px}
.editor-actions{padding:16px 20px;flex-shrink:0}
.queue{padding:14px 10px;display:block;grid-column:auto}
.queue h2{font-size:14px}
.queue .draft{margin-top:14px;max-width:none}
.queue-note{border-top:1px solid var(--line);padding-top:15px;margin-top:22px}
.queue-empty{padding:36px 0;text-align:center}
.queue-empty svg{display:inline-block}
#toast{left:calc(50% + 36px)}
@media(min-width:1800px){.studio{grid-template-columns:minmax(480px,.54fr) minmax(0,1fr) clamp(168px,10.5vw,204px)}}
@media(max-width:1199px) and (min-width:761px){
  .home{padding:32px}.studio{padding:20px;grid-template-columns:minmax(280px,.65fr) minmax(300px,1fr);height:auto;min-height:100vh}
  .studio>.panel{height:auto;min-height:620px}.studio>.queue{grid-column:1/-1;min-height:0;display:flex;align-items:center;gap:20px}
  .queue .draft{max-width:220px;margin:0}.queue-note{margin:0 0 0 auto;border:0;padding:0}.queue-empty{padding:0}.queue-empty svg{display:none}
}
@media(max-width:760px){
  .sidebar{width:64px;padding:14px 5px}.brand{width:36px;height:36px;margin-bottom:22px}.nav{gap:7px}.nav button{font-size:10px;min-height:53px}
  .main-wrap{margin-left:64px}.topbar{height:60px;padding:0 16px}.brand-name{font-size:16px}.topbar-actions{gap:0}
  .home{padding:25px 16px}.welcome{margin-bottom:24px}.welcome h1{font-size:25px;line-height:34px}.welcome p{font-size:12px;margin-top:8px}
  .composer{padding:12px;border-radius:15px}.compose-input{gap:9px}.add-tile{width:55px;height:62px;padding:0;margin:0;font-size:10px}
  .compose-input textarea{height:113px;min-height:113px;padding:2px;font-size:13px;line-height:24px}.compose-bottom{margin-top:10px;align-items:center}
  .compose-bottom .primary{font-size:12px;padding:7px 10px}.compose-bottom select{font-size:12px;max-width:114px}
  .tool-strip{grid-template-columns:repeat(3,1fr);gap:20px 8px;margin:25px 0 32px}.tool-item{font-size:11px;line-height:20px;gap:7px}.tool-item>span{width:40px;height:40px}
  .scenes{grid-auto-flow:row;grid-auto-columns:auto;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;overflow:visible;padding:0;margin-bottom:24px}
  .scene{min-height:0}.scene-media{height:90px}.scene-media svg{width:28px;height:28px}.scene-info{display:block;padding:10px}.scene strong{font-size:12px}.scene small{font-size:10px;margin-top:4px}
  .section-heading h2{font-size:19px}.studio{height:auto;padding:16px;display:flex;flex-direction:column}.studio>.panel{height:auto;min-height:0;overflow:visible}
  .studio>.work-panel{min-height:440px}.work-panel .panel-heading{padding:16px}.editor{padding:0 16px 16px}.editor textarea{min-height:270px;flex:auto}
  .queue-note{margin-top:15px;padding-top:15px}.queue-empty{padding:20px 0}.parameters{grid-template-columns:1fr}.editor-actions{padding:16px}
  #toast{left:50%}
}
