*{box-sizing:border-box}
:root{color-scheme:dark;--paper:#f5e8cf;--muted:#c6b6a0;--ink:#201c19;--warm:#d2a16b;--line:#65504a;--serif:Georgia,"Times New Roman",serif;--mono:Consolas,"Courier New",monospace;--sans:Arial,Helvetica,sans-serif}
html,body{width:100%;height:100%;margin:0;overflow:hidden;overscroll-behavior:none;background:#190e10}
body{font:15px/1.4 var(--sans);color:var(--paper)}
button,a{color:inherit;font:inherit}button{appearance:none;cursor:pointer;border:0;background:transparent}.ico{width:19px;height:19px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;vertical-align:middle}.ico>*{pointer-events:none}a{text-decoration:none}
button:focus-visible,a:focus-visible,[tabindex]:focus-visible{outline:2px solid #ffd29b;outline-offset:3px}button:disabled{opacity:.38;cursor:default}
h1,h2,h3,p,figure{margin:0}h1,h2,h3{font-family:var(--serif);font-weight:normal}button:hover:not(:disabled){filter:brightness(1.1)}
[hidden]{display:none!important}.sr{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden;white-space:nowrap}
#lab{isolation:isolate;position:relative;width:100%;height:100%;height:100dvh;display:grid;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden;background:#2f2020}
.hud{position:relative;z-index:1;min-width:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px max(22px,env(safe-area-inset-right)) 8px max(22px,env(safe-area-inset-left));padding-top:max(8px,env(safe-area-inset-top));background:linear-gradient(180deg,#262020,#1e1918);border-bottom:1px solid #5b413a;box-shadow:0 5px 14px #1009083d}
.lab-name,.hud-right,.hud-button,.lab-symbol,.scene-id,.reel-button,.scene-meta,.caption,.control-label,.layer,.primary,.secondary,.text-button,.mini-actions button,.close,.dialog-commands{display:flex;align-items:center}
.lab-name{gap:10px;padding:0;font:clamp(18px,1.8vw,26px)/1 var(--serif);letter-spacing:-.04em;white-space:nowrap}.lab-symbol{justify-content:center;width:34px;height:34px;color:#f6c7a0;border:1px solid #a05a49;background:linear-gradient(135deg,#883e32,#552820);border-radius:50%}.lab-symbol .ico{width:21px;height:21px}.lab-name em{font-weight:normal}
.hud-right{gap:clamp(12px,2.1vw,35px)}.readout{display:flex;align-items:baseline;gap:6px;white-space:nowrap}.readout-label,.control-label,.caption,.film-edge,.dialog-label{font-family:var(--mono);text-transform:uppercase}.readout-label{color:#cbb7a0;font-size:10px;letter-spacing:.09em}.readout b,#collection-count,.scene-meta,.reel-button,.control-label span{font-family:var(--mono);font-variant-numeric:tabular-nums}.readout b{font-size:15px;font-weight:normal}.hud-button{gap:7px;min-height:36px;color:#e8dcc9;padding:3px 5px}.hud-text{font-size:13px}#collection-count{font-size:11px}.pause-key,.close{border:1px solid #70594c;border-radius:50%;width:37px;height:37px;justify-content:center;background:#382e28;color:#f3e2ce}
.set{position:relative;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr);isolation:isolate;background:radial-gradient(ellipse at 23% 42%,#79544754,transparent 55%),linear-gradient(108deg,#392924 0%,#342222 53%,#471c20 100%);overflow:hidden}
.set:before,.set:after{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none}.set:before{background:url('assets/surface.svg');opacity:.64}.set:after{background:linear-gradient(156deg,transparent 69%,#9a504219 69.3%,transparent 72%),repeating-linear-gradient(135deg,transparent 0 113px,#f7d3a602 114px 115px),radial-gradient(ellipse at 58% 50%,transparent 45%,#110a0c70)}
.scene-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;width:min(1240px,100%);margin:0 auto;padding:clamp(12px,2.4vh,24px) clamp(22px,4vw,65px) 3px}
.scene-id{gap:clamp(12px,1.8vw,26px);min-width:0}.reel-button{white-space:nowrap;gap:8px;border:1px solid #91715f;border-radius:2px;padding:7px 10px;color:#f0c091;background:#3b2c26;font-size:11px;letter-spacing:.04em;min-height:34px}
.reel-button .ico{width:16px;height:16px}.reel-button .ico:last-child{width:11px}
#scene-title{font-size:clamp(24px,3.1vw,44px);line-height:1.12;letter-spacing:-.04em}
.scene-meta{gap:15px;font-size:13px;color:#dcbfa7}.series-meter{display:flex;gap:4px}.series-meter span{width:clamp(8px,1.15vw,17px);height:4px;background:#755952}.series-meter .current{background:#e4ba86}.series-meter .developed{background:#d76950}
.mounts{position:relative;min-height:0;min-width:0;container-type:size}
.table-pictures{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:min(6cqw,110px);padding:0 2.8cqw 2cqh}
.working-column,.proof-column{min-width:0;position:relative}
.working-column{width:min(50cqw,calc(128cqh - 124px),690px)}.proof-column{width:min(28cqw,calc(79cqh - 67px),406px);transform:translateY(2cqh)}
.caption{gap:8px;justify-content:flex-start;margin:0 0 12px 4px;font-size:11px;letter-spacing:.13em;color:#eed4b9}.caption .ico{width:15px;height:15px}.work-caption span{display:inline-block;width:7px;height:7px;background:#e4ac68;box-shadow:0 0 9px #f8ad6c;border-radius:50%}
.easel{position:relative;isolation:isolate;padding:clamp(7px,.8vw,13px);border-radius:6px;background:linear-gradient(154deg,#716459 0%,#4c443c 2%,#312d29 50%,#251f1d 97%,#766457 100%);border:1px solid #806d5a;box-shadow:1px 2px 0 #191210,3px 7px 0 #1a1412,8px 20px 35px #140b0a80,inset 0 2px 2px #e5d1ad30}
.filmstrip{position:relative;padding:24px 7px;background:linear-gradient(100deg,#54321f,#36251b 55%,#4c2e20);border:1px solid #281b16;box-shadow:inset 0 0 7px #140e0b}
.filmstrip:before,.filmstrip:after{content:"";position:absolute;left:8px;right:8px;height:6px;background:repeating-linear-gradient(90deg,#dac8ab 0 10px,transparent 10px 22px);opacity:.87;border-radius:1px}.filmstrip:before{top:5px}.filmstrip:after{bottom:5px}
.film-edge{position:absolute;left:9px;right:9px;display:flex;justify-content:space-between;font-size:7px;font-weight:bold;letter-spacing:.15em;color:#ebb26e;line-height:1}.top-edge{top:14px}.bottom-edge{bottom:13px}
#work-image{aspect-ratio:4/3;cursor:grab;touch-action:none;user-select:none;background:#c99a65;box-shadow:0 0 0 1px #2e211a,0 0 9px #ecb67631;overflow:hidden}
#work-image.dragging{cursor:grabbing}
.paper{position:relative;display:block;background:linear-gradient(134deg,#f2e9d7,#d3cbbd);padding:clamp(7px,.74vw,13px) clamp(7px,.74vw,13px) 0;color:#322f29;box-shadow:2px 5px 9px #100b0a69}
.paper-image{display:block;aspect-ratio:4/3;width:100%;overflow:hidden}.paper-foot{display:flex;align-items:center;justify-content:space-between;gap:5px;min-height:clamp(24px,3.8vh,42px);font:italic clamp(13px,1.3vw,20px)/1.05 var(--serif)}
.paper-foot .ico{width:14px;height:14px;color:#686052}.proof{width:100%;transform:rotate(3deg);margin-top:15px;box-shadow:6px 11px 17px #150b0b62;text-align:left}
.tape{position:absolute;top:-7px;left:32%;width:35%;height:17px;background:linear-gradient(100deg,#cbb897b5,#cbbca1d9,#b9ac89bc);transform:rotate(-6deg);clip-path:polygon(1% 7%,99% 0,97% 20%,100% 41%,97% 64%,99% 93%,1% 100%,3% 72%,0 55%,3% 32%)}
.control-deck{position:relative;background:linear-gradient(#51443a 0,#322c28 3px,#292522 7px,#231f1d 96%,#302926);border-top:1px solid #977763;padding:clamp(13px,2.2vh,23px) max(22px,env(safe-area-inset-right)) max(clamp(13px,2.2vh,24px),env(safe-area-inset-bottom)) max(22px,env(safe-area-inset-left));box-shadow:0 -9px 26px #160c0d33}
.deck-inner{display:flex;justify-content:space-between;align-items:stretch;gap:clamp(14px,2.7vw,46px);max-width:1200px;margin:auto}.film-picker{min-width:0;flex:1 1 35%}.control-label{gap:8px;color:#dfcdb7;font-size:10px;letter-spacing:.12em;line-height:1.2;margin:0 0 8px}
.control-label span{font-size:9px;font-weight:normal;text-transform:none;letter-spacing:0;color:#bca58e}.layer-list,.adjust,.dirpad,.rotate,.mini-actions,.shutter{display:flex}.layer-list{gap:6px}.layer{min-width:0;flex:1;max-width:167px;gap:7px;min-height:45px;padding:5px 8px;border-radius:3px;border:1px solid #716153;background:linear-gradient(#463d35,#39332d);color:#eee0cc;text-align:left}
.layer[aria-pressed=true]{background:linear-gradient(120deg,#794739,#58382b);border-color:#d2a16b;box-shadow:inset 0 -2px #d5a87870}
.layer-thumb{display:block;flex:none;width:30px;height:24px;overflow:hidden;border:1px solid #bc936c;background:linear-gradient(140deg,#ddb67c,#ab7d53)}.layer-thumb svg{display:block;width:100%;height:100%;fill:#493426}.layer-name{font-size:clamp(11px,1vw,14px);line-height:1.12;overflow-wrap:anywhere}.layer-key{display:none}
.adjust{gap:clamp(12px,1.8vw,27px);align-items:flex-end;flex:none}.dirpad,.rotate{gap:4px}.adjust button,.mini-actions button{border:1px solid #72604f;border-radius:4px;background:linear-gradient(#453d34,#363029);box-shadow:0 2px #1b1715;color:#f4e5cc;justify-content:center;padding:0}.adjust button{display:grid;place-items:center;height:45px;width:clamp(34px,3.2vw,47px)}.rotate button{color:#f1bb8f}.shutter{align-items:flex-end;gap:10px;flex:none}.mini-actions{gap:4px}.mini-actions button{width:40px;height:45px;flex-direction:column;gap:3px}.mini-actions button span{font-size:8px}
.primary,.secondary,.text-button,.download-sheet{justify-content:center;gap:8px;font:600 14px/1.2 var(--sans);border-radius:4px;padding:10px 14px;min-height:42px}.primary{border:1px solid #db7459;background:linear-gradient(#b84636,#993d30);box-shadow:0 2px 0 #4e2320;color:#fff3e3}.secondary,.download-sheet{color:#f1ddc5;border:1px solid #846c56;background:#3d3028}.text-button{font-weight:400;color:#ecd8bd}.print-button{height:45px;white-space:nowrap;padding-inline:18px}.print-button .ico{width:17px;height:17px}
#save-notice{position:absolute;left:8px;bottom:5px;z-index:3;max-width:90%;background:#421e1a;padding:2px 6px;color:#ffe1bb;font-size:11px}
dialog{position:fixed;inset:0;width:min(540px,calc(100% - 24px));max-width:calc(100% - 16px);max-height:calc(100% - 20px);max-height:calc(100dvh - 20px);margin:auto;overflow:auto;overscroll-behavior:contain;padding:0;background:#302721;border:1px solid #8c715c;border-radius:6px;color:var(--paper);box-shadow:0 25px 95px #090505a6}
dialog::backdrop{background:#110c0dcc;backdrop-filter:blur(4px)}.dialog-inner{padding:clamp(16px,2.5vmin,28px)}.dialog-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.dialog-label{font-size:10px;letter-spacing:.12em;color:#e9ac77;margin-bottom:5px}.dialog-top h2{font-size:clamp(27px,4vmin,38px);line-height:1.08;letter-spacing:-.04em}.close{min-width:36px;width:36px;height:36px;flex:none}.close .ico{width:16px;height:16px}
.dialog-copy{font-size:14px;line-height:1.5;color:#e1d1bb;margin-top:13px}.dialog-commands{gap:8px;flex-wrap:wrap;margin-top:16px}.large-proof{margin:18px auto 0;width:min(100%,330px,45dvh);padding:8px 8px 0;transform:rotate(-1deg)}.large-proof .paper-foot{min-height:29px;font-size:16px}
.bath{position:relative;background:linear-gradient(132deg,#784139,#35211f 63%,#4b2b28);box-shadow:inset 0 3px 7px #10090770;border:3px solid #6d463b;border-radius:8px;margin-top:15px;padding:13px}.bath .paper{margin:0 auto}.bath .paper-image{background:#ddd4c4}.developing .paper-image svg{animation:develop 1.1s ease-out both}@keyframes develop{0%{opacity:0;filter:blur(4px)}25%{opacity:.12}100%{opacity:1}}
dialog.gallery-dialog,dialog.frames-dialog{width:min(790px,calc(100% - 20px))}
.gallery-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:13px}.download-sheet{display:inline-flex;align-items:center;font-size:13px;min-height:36px;padding:7px 11px}.download-sheet .ico{width:15px;height:15px}.export-status{font-size:12px;color:#d9c6ad}.gallery-grid,.frame-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-top:16px}
.gallery-print,.empty-print,.frame-card{min-width:0;text-align:left}.gallery-print{padding:5px 5px 0}.gallery-print .paper-foot{font-size:13px;min-height:28px}.empty-print{border:1px dashed #80705e;min-height:88px;display:grid;align-content:center;justify-items:center;gap:5px;padding:6px;text-align:center;color:#d6bea3;font-size:12px}.empty-print span:first-child{font:18px var(--mono);color:#a5927c}
.frame-card{position:relative;background:#45362c;border:1px solid #77604b;padding:5px;border-radius:3px}.frame-card[aria-current=true]{border-color:#e3ad78}.preview{display:block;position:relative;aspect-ratio:4/3}.frame-index,.ready-mark{position:absolute;top:3px;color:#edd9b3;background:#493223e8;left:3px;font:10px var(--mono);padding:2px 3px}.ready-mark{left:auto;right:3px}.ready-mark .ico{width:11px;height:11px}.frame-name{display:block;margin:4px 0 1px;font-size:12px;color:#f1e1cb}
.help-list{padding-left:20px;margin:15px 0;color:#e2d5c3;font-size:14px}.help-list li{margin:0 0 8px;padding-left:4px}.help-list li::marker{color:#edb780}.keys{border-top:1px solid #615145;padding-top:10px;font-size:12px;color:#d9c8b2;line-height:1.8}kbd{font:11px var(--mono);border:1px solid #796956;border-radius:3px;padding:1px 4px}
@media(max-width:1090px){.deck-inner{gap:13px}.layer{padding:4px 6px;gap:5px}.layer-thumb{width:24px}.adjust{gap:10px}.control-deck{padding-inline:15px}.shutter{gap:6px}.mini-actions button{width:33px}.print-button{padding-inline:12px}.caption{font-size:10px}}
@media(min-width:711px) and (max-width:900px){.layer{flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:2px}.layer-thumb{height:16px}.layer-name{font-size:10px}.adjust button{width:31px}.control-label span{display:none}.mini-actions button{width:30px}.mini-actions button span{display:none}.print-button{padding-inline:9px}.deck-inner{gap:10px}}
@media(max-width:710px) and (min-height:501px){
  .hud{padding:6px 11px}.hud-right{gap:10px}.hud-text{display:none}.readout{display:grid;gap:0;justify-items:center}.readout b{font-size:13px}.readout-label{font-size:8px}.lab-symbol{width:27px;height:27px}.lab-symbol .ico{width:17px;height:17px}.lab-name{font-size:18px;gap:6px}.hud-button{min-height:36px;padding-inline:1px}.pause-key{width:35px}
  .scene-heading{padding:12px 13px 3px;align-items:center}.scene-id{gap:8px}.reel-button{font-size:10px;min-height:32px;gap:4px;padding:5px 7px}.reel-button .ico{width:12px}.scene-meta{gap:6px}.series-meter{display:none}#scene-title{font-size:clamp(22px,5.4vw,31px)}
  .table-pictures{flex-direction:column-reverse;gap:2.5cqh;justify-content:center;padding:2cqh 5cqw}.working-column{width:min(89cqw,calc(79cqh - 72px),510px);align-self:center;transform:translateX(-2cqw)}.proof-column{width:min(44cqw,calc(44cqh - 42px),245px);align-self:flex-end;transform:rotate(-1deg);margin-right:3cqw}.caption{font-size:9px;margin-bottom:7px;letter-spacing:.09em}.proof-caption{position:absolute;right:calc(100% + 13px);top:45%;white-space:nowrap;margin:0}.proof{margin-top:0}.paper-foot{min-height:22px;font-size:13px}.tape{height:10px;top:-4px}.easel{padding:6px}.filmstrip{padding:18px 4px}.filmstrip:before,.filmstrip:after{height:4px;left:4px;right:4px;background:repeating-linear-gradient(90deg,#dac8ab 0 7px,transparent 7px 16px)}.top-edge{top:10px}.bottom-edge{bottom:10px}.film-edge{font-size:6px}
  .control-deck{padding:10px 12px max(10px,env(safe-area-inset-bottom))}.deck-inner{display:grid;grid-template-columns:1fr auto;grid-template-areas:"m m" "a a" "s s";gap:8px}.film-picker{grid-area:m;display:flex;align-items:center;gap:8px}.film-picker>.control-label{width:38px;flex:none;margin:0}.layer-list{flex:1}.layer{min-height:39px;max-width:none;padding:3px 6px}.layer-name{font-size:12px}.control-label{font-size:9px;letter-spacing:.04em;margin-bottom:4px}.adjust{grid-area:a;justify-content:space-between}.adjust-group{display:flex;align-items:center;gap:5px}.adjust-group>.control-label{margin:0}.control-label span{display:none}.adjust button{width:38px;height:39px}.shutter{grid-area:s;justify-content:space-between;gap:10px}.mini-actions button{height:39px;min-width:41px;flex-direction:row;padding:0 6px;gap:4px;width:auto}.mini-actions button span{font-size:11px}.print-button{height:41px;min-height:41px;min-width:122px}.gallery-grid,.frame-list{grid-template-columns:repeat(3,minmax(0,1fr))}.empty-print{min-height:68px}.gallery-print .paper-foot{font-size:12px;line-height:1.1}
}
@media(max-width:380px) and (min-height:501px){.lab-name>span:last-child{font-size:16px}.hud-right{gap:7px}.hud .ico{width:16px}.lab-symbol{width:24px;height:24px}.scene-meta{display:none}.scene-heading{padding:9px}.adjust button{width:32px}.layer-thumb{display:none}.film-picker>.control-label{width:29px}.control-deck{padding-inline:9px}.adjust-group{gap:4px}.dirpad,.rotate{gap:3px}.deck-inner{gap:7px}}
@media(max-height:500px) and (orientation:landscape){
  .hud{padding:3px 12px}.hud-right{gap:14px}.lab-symbol{width:24px;height:24px}.lab-symbol .ico{width:16px;height:16px}.lab-name{font-size:17px}.hud-button{min-height:29px}.pause-key{width:29px;height:29px}.readout b{font-size:12px}.readout-label{font-size:9px}
  .scene-heading{padding:5px 14px 0}.scene-id{gap:8px}.reel-button{min-height:26px;padding:3px 6px;font-size:9px}.reel-button .ico{width:12px}.scene-meta{font-size:10px}#scene-title{font-size:22px}
  .table-pictures{padding:0 3cqw 2cqh;gap:9cqw}.working-column{width:min(49cqw,calc(129cqh - 64px),600px)}.proof-column{width:min(28cqw,calc(89cqh - 44px),330px);transform:none}.caption{font-size:9px;margin-bottom:5px}.easel{padding:4px}.filmstrip{padding:10px 3px}.filmstrip:before,.filmstrip:after{height:3px;left:4px;right:4px}.filmstrip:before{top:3px}.filmstrip:after{bottom:3px}.film-edge{display:none}.paper{padding:5px 5px 0}.proof{margin-top:6px}.paper-foot{min-height:19px;font-size:12px}.tape{height:8px;top:-3px}
  .control-deck{padding:5px 10px 7px}.deck-inner{gap:10px}.control-label{font-size:8px;margin-bottom:3px}.control-label span{display:none}.layer{min-height:34px;padding:2px 4px}.layer-thumb{display:none}.layer-name{font-size:10px}.adjust button,.mini-actions button{height:34px;width:31px}.mini-actions button span{display:none}.primary.print-button{height:34px;min-height:34px;font-size:12px;padding:4px 8px}.shutter,.adjust{gap:6px}.hud-text{display:none}.mini-actions,.dirpad,.rotate,.layer-list{gap:3px}
  .large-proof{width:min(210px,37dvh)}.dialog-inner{padding:12px 16px}.dialog-top h2{font-size:22px}.dialog-label{font-size:9px;margin:0}.bath{padding:5px;margin-top:8px}.dialog-copy,.dialog-commands{margin-top:7px}.gallery-grid,.frame-list{grid-template-columns:repeat(4,minmax(0,1fr));margin-top:8px;gap:6px}.gallery-grid .paper-image,.frame-list .preview{max-height:15dvh}.gallery-grid .paper-foot{min-height:18px}.gallery-tools{margin-top:6px}.empty-print{min-height:40px}.dialog-commands .primary,.dialog-commands .secondary,.dialog-commands .text-button{min-height:33px;padding:6px 9px}
}
@media(max-width:650px) and (max-height:500px) and (orientation:landscape){.readout-label{display:none}.layer-list{flex-wrap:nowrap}.control-deck{padding-inline:5px}.deck-inner{gap:5px}.layer-name{font-size:9px}.mini-actions button,.adjust button{width:27px}.shutter{gap:3px}.hud-right{gap:7px}.print-button .ico{display:none}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important}}

@media(min-width:1100px){
  .mini-actions button{width:auto;min-width:55px;padding-inline:6px}.mini-actions button span{font-size:10px}
  .control-label{font-size:11px}.layer-name{font-size:14px}
}
@media(max-width:380px) and (min-height:501px){
  .hud{padding-inline:8px;gap:5px}.lab-name{gap:4px}.lab-name>span:last-child{font-size:14px}
  .hud-button{gap:4px}.readout b{font-size:12px}.hud-right{gap:6px}.pause-key{width:33px}
}
@media(max-width:710px) and (min-height:501px) and (max-height:700px){
  .working-column{width:min(88cqw,calc(94cqh - 70px))}.proof-column{width:min(38cqw,calc(38cqh - 17px))}
  .proof .paper-foot{min-height:18px;font-size:11px}.proof #paper-title{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
  .easel{padding:4px}.filmstrip{padding:12px 3px}.film-edge{display:none}.table-pictures{gap:1.5cqh}
}
