:root{font-family:"Yu Gothic UI","Hiragino Kaku Gothic ProN",system-ui,sans-serif;color:#343e38;background:#f5f2ec;font-synthesis:none;--green:#416a55;--muted:#7b8179;--border:#e3e5dd}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,.file-button,select{cursor:pointer}button:focus-visible,a:focus-visible,label:focus-within,input:focus-visible,select:focus-visible{outline:3px solid #c29b57;outline-offset:4px}button{border:0}button:disabled,input:disabled,select:disabled{opacity:.45;cursor:default}.topbar{height:88px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 5vw}.brand{display:flex;align-items:center;gap:12px;color:inherit;text-decoration:none;font-family:Georgia,serif;font-size:24px}.brand-icon{background:var(--green);color:#fff;padding:4px 11px;border-radius:10px;font-size:26px}.brand small{font-family:system-ui,sans-serif;font-size:11px;color:var(--muted);margin-left:12px;letter-spacing:.1em}.local-badge{font-size:11px;color:#687765;display:flex;align-items:center;gap:8px}.local-badge i{width:6px;height:6px;border-radius:50%;background:#72966b}main{max-width:1440px;margin:auto;padding:42px 5vw 0}.intro{display:flex;align-items:center;justify-content:space-between;margin-bottom:30px}.eyebrow{font-size:10px;letter-spacing:.2em;color:#83907d;margin:0 0 12px}h1{font-family:"Yu Mincho","Hiragino Mincho ProN",serif;font-size:31px;font-weight:500;letter-spacing:.06em;margin:0 0 12px}.intro p:last-child{font-size:12px;color:var(--muted);margin:0}.primary{background:var(--green);color:white;border-radius:8px;padding:13px 19px;font-size:12px}.intro button span{margin-left:25px}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:26px;align-items:start}.preview{border:1px solid #dcdfd5;border-radius:14px;overflow:hidden;background:#fff}.stage-top,.stage-bottom{height:49px;display:flex;align-items:center;justify-content:space-between;padding:0 20px;color:var(--muted);font-size:10px}.stage-top>span:first-child{letter-spacing:.2em;font-size:9px}.stage-top>span:last-child{font-size:10px;color:#688367}.stage{height:560px;position:relative;overflow:hidden;background:#e7eddf;background-size:cover;background-position:center;isolation:isolate;touch-action:none}.scene-decoration{position:absolute;inset:0;overflow:hidden;pointer-events:none;background:linear-gradient(#e3ebdf,#f4edda)}.sun{position:absolute;top:65px;right:100px;width:115px;height:115px;background:#fff8dc;border-radius:50%;box-shadow:0 0 70px #fff8dc80}.hill{position:absolute;width:140%;height:65%;border-radius:50% 50% 0 0;bottom:-24%;background:#b9cab0;transform:rotate(-8deg);left:-25%}.hill-front{background:#95b09a;bottom:-38%;left:0;transform:rotate(8deg)}.stage-caption{position:absolute;top:32px;left:30px;font-family:"Yu Mincho",serif;letter-spacing:.2em;font-size:13px;color:#71846f}.character{position:absolute;width:240px;height:320px;transform:translate(-50%,-100%);touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none}.character img{width:100%;height:100%;object-fit:contain;pointer-events:none;display:block}.character.selected:after{content:"";position:absolute;inset:8px;border:1px dashed #ffffffa0;border-radius:15px;pointer-events:none}.quiet{background:transparent;color:#64755f;font-size:11px;padding:8px}.panel{background:#fffdf9;border:1px solid var(--border);border-radius:14px;padding:22px}.control-section+.control-section{border-top:1px solid var(--border);margin-top:20px;padding-top:20px}.section-title{display:flex;align-items:center;gap:9px;margin-bottom:15px}.section-title h2{font-size:13px;margin:0;font-weight:600}.step{color:#98a28d;font-size:10px;font-family:Georgia,serif}.count{margin-left:auto;color:#90968c;font-size:10px}.file-button{display:block;text-align:center;font-size:11px;padding:13px 5px;position:relative}.file-button input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}.help{font-size:9px;color:#96998f;margin:9px 0;line-height:1.6}.secondary{border:1px solid #d6ddd1;border-radius:7px;color:#5f715d;margin-top:12px;background:white}.characters{display:grid;gap:5px}.character-choice{display:flex;align-items:center;gap:9px;width:100%;padding:7px 9px;text-align:left;background:#f4f5ee;color:#475c48;border-radius:6px;border:1px solid transparent;font-size:11px}.character-choice.active{border-color:#96ab8d}.character-choice img{width:25px;height:32px;object-fit:contain}.character-choice small{margin-left:auto;color:#829177;font-size:9px}.demo-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}.text-button{padding:5px 0;background:transparent;color:#6f8065;font-size:10px;text-decoration:underline;text-underline-offset:3px}.backgrounds{display:flex;gap:10px}.swatch{width:44px;height:35px;border-radius:6px;border:3px solid #fff;box-shadow:0 0 0 1px #e5e5dc}.swatch.active{box-shadow:0 0 0 2px #6d8c68}.landscape{background:linear-gradient(165deg,#e7eddf 50%,#a6bea0 51%)}.cream{background:#f3e6d2}.dusk{background:linear-gradient(#b9aec9,#eed3bd)}.check{background:conic-gradient(#e0e3dc 25%,#fff 0 50%,#e0e3dc 0 75%,#fff 0) 0 0/18px 18px}.range-label{display:flex;justify-content:space-between;font-size:11px}.range-label output{color:#7c8e70;font-size:10px}input[type=range]{width:100%;accent-color:#5d7f5b;margin:16px 0 0}.range-ends{display:flex;justify-content:space-between;font-size:9px;color:#a0a295;margin-top:3px}.select-label{display:block;font-size:11px;margin:18px 0 8px}select{width:100%;background:#f9faf5;border:1px solid #dfe3d7;border-radius:6px;padding:9px;color:#576751;font-size:11px}.arrange-actions{display:flex;justify-content:space-between;margin-top:13px}.danger{color:#997b6b}.privacy{color:#969b8d;font-size:9px;line-height:1.9;margin:19px 0 0}#status{font-size:11px;color:#74816c;min-height:20px;margin:17px 0}#status.error{color:#a64437}footer{margin-top:27px;border-top:1px solid var(--border);padding:22px 0;display:flex;justify-content:space-between;font-size:10px;color:#9a9d91}.version{font-size:8px;letter-spacing:.1em;margin-left:15px}.exit-view{position:fixed;top:max(20px,env(safe-area-inset-top));right:20px;z-index:20;background:#fffdf9ec;border-radius:40px;padding:13px 20px;color:#415b43;box-shadow:0 2px 20px #0001}.viewing .topbar,.viewing .intro,.viewing .panel,.viewing footer,.viewing #status,.viewing .stage-top,.viewing .stage-bottom{display:none}.viewing main{padding:0;max-width:none}.viewing .workspace{display:block}.viewing .preview{border:0;border-radius:0}.viewing .stage{height:100vh;height:100dvh}.viewing .character.selected:after{display:none}.viewing .stage-caption{display:none}.viewing .character{cursor:default}[hidden]{display:none!important}@media(min-width:1500px){.stage{height:610px}}@media(max-width:900px){.brand small{display:none}main{padding:28px 20px 0}.workspace{grid-template-columns:minmax(0,1fr) 270px;gap:16px}.panel{padding:17px}.stage{height:550px}.topbar{padding:0 20px}.stage-caption{font-size:11px}.sun{right:30px}}@media(max-width:650px){.topbar{height:68px}.brand{font-size:20px}.local-badge{font-size:0}.intro{gap:14px;align-items:flex-end}h1{font-size:23px}.eyebrow{font-size:8px}.intro p:last-child{font-size:10px;line-height:1.7}.intro button{padding:11px;font-size:10px;white-space:nowrap}.intro button span{margin-left:3px}.workspace{display:flex;flex-direction:column}.preview,.panel{width:100%}.stage{height:440px}.panel{padding:22px}.stage-caption{left:20px}.stage-top,.stage-bottom{padding:0 14px}.intro{margin-bottom:22px}footer>span:last-child{display:none}.version{margin-left:8px}.privacy{font-size:10px}.help{font-size:10px}.text-button{font-size:11px}}
.character canvas{width:100%;height:100%;display:block;pointer-events:none;object-fit:contain;background:transparent}
.background-image{position:absolute;max-width:none;max-height:none;transform:translate(-50%,-50%);pointer-events:none;user-select:none;-webkit-user-select:none;z-index:-1}
.scene-decoration{z-index:-1}
.editing-background{cursor:move;outline:2px solid #6d8c68;outline-offset:-2px}
.editing-background .character{pointer-events:none}
.editing-background .character.selected:after{display:none}
.background-arrows{display:flex;gap:8px;margin-top:12px}
.background-arrows button{flex:1;min-height:44px;border-radius:6px;background:#eef1e7;color:#416a55}
.deletion-controls .file-button{width:100%;white-space:normal;overflow-wrap:anywhere}
.character-choice span{overflow-wrap:anywhere;min-width:0}
.character-choice small{flex-shrink:0}
.viewing{background:#202923;overflow:hidden}
.viewing .preview{position:absolute;left:var(--viewport-page-left,0px);top:var(--viewport-page-top,0px);width:var(--viewport-width,100vw);height:100vh;height:var(--viewport-height,100dvh);transform:none;border:0;border-radius:0}
.viewing .stage{width:100%;height:100%}
.save-notice{border:1px solid var(--border);border-radius:8px;padding:10px 14px;background:#fffdf9;font-size:11px;color:#64755f}
.save-notice p{margin:4px 0;line-height:1.7}
#saveStatus.error{color:#a64437;font-weight:600}
.viewing .save-notice{display:none}
.viewing.save-error .save-notice{display:block;position:fixed;bottom:max(15px,env(safe-area-inset-bottom));left:15px;right:15px;z-index:30;max-width:600px}
.restoring .workspace,.restoring #viewMode{pointer-events:none;opacity:.65}


.view-controls{position:absolute;top:var(--viewport-page-top,0px);left:var(--viewport-page-left,0px);width:var(--viewport-width,100vw);z-index:40;display:flex;justify-content:flex-end;align-items:center;gap:8px;padding:12px;padding-top:max(12px,env(safe-area-inset-top));padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right));pointer-events:none}
.view-control{pointer-events:auto;min-height:44px;padding:10px 14px;border-radius:24px;background:#fffdf9bd;color:#415b43;font-size:12px;box-shadow:0 2px 16px #0001}
#fullscreenMessage{font-size:11px;color:#fff;background:#202923d9;border-radius:8px;max-width:260px;line-height:1.6}
#fullscreenMessage:not(:empty){padding:8px}
.viewing .character{pointer-events:none}
@media(display-mode:standalone){html,body{min-height:100%;background-color:#202923}body:not(.viewing){background:#f5f2ec}body:not(.viewing) .topbar{padding-top:env(safe-area-inset-top);height:calc(88px + env(safe-area-inset-top));padding-left:max(20px,env(safe-area-inset-left));padding-right:max(20px,env(safe-area-inset-right))}}

.composition{position:absolute;inset:0;isolation:isolate;transform-origin:0 0;background:transparent}
.viewing .sun{right:var(--scene-sun-right,30px)}
.viewing .preview{z-index:10}
.viewing.save-error .save-notice{position:absolute;bottom:auto;top:calc(var(--viewport-page-top,0px) + var(--viewport-height,100dvh) - max(15px,env(safe-area-inset-bottom)));left:calc(var(--viewport-page-left,0px) + max(15px,env(safe-area-inset-left)));right:auto;width:calc(var(--viewport-width,100vw) - max(15px,env(safe-area-inset-left)) - max(15px,env(safe-area-inset-right)));transform:translateY(-100%)}

.background-layer{position:absolute;inset:0;isolation:isolate;background:inherit;pointer-events:none}
.viewing .composition{width:100%;height:100%;overflow:visible;transform:none;clip-path:none;mask:none;-webkit-mask:none}
