:root{font-family:Arial,'Hiragino Kaku Gothic ProN','Noto Sans JP',sans-serif;color:#f6f4eb;background:#182321;font-synthesis:none}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}#scene{display:block;width:100%;height:100%;touch-action:none}button{font:inherit;font-size:14px;cursor:pointer;color:inherit;border:1px solid #ffffff28;border-radius:8px;background:#182522c9;padding:11px 15px;backdrop-filter:blur(16px);transition:background .18s,border-color .18s}button:hover{background:#34463c}button:focus-visible{outline:2px solid #e3c59a;outline-offset:4px}button[aria-pressed=true],button.active{background:#e8dfcc;color:#23332b;border-color:#e8dfcc}header{position:absolute;left:32px;right:32px;top:max(24px,env(safe-area-inset-top));display:flex;align-items:center;justify-content:space-between;pointer-events:none}.brand{font-family:Georgia,serif;letter-spacing:.08em;font-size:26px;font-weight:bold;text-shadow:0 2px 18px #0008}.brand span{font-weight:normal}.brand small{display:block;font-family:Arial,sans-serif;font-size:10px;letter-spacing:.33em;font-weight:normal;margin-top:5px}.top-actions{display:flex;gap:8px;pointer-events:auto}.top-actions button:last-child{width:40px;padding:10px}.view-title{position:absolute;top:115px;left:32px;pointer-events:none;text-shadow:0 2px 20px #0009}.view-title span{font-size:12px;letter-spacing:.18em;color:#cfcdbd}.view-title h1{font-family:Georgia,'Yu Mincho',serif;font-size:30px;font-weight:normal;margin:10px 0}.view-title p{font-size:13px;color:#dddcd1;margin-top:0}.right-tools{position:absolute;top:112px;right:32px;display:flex;gap:8px}.places{position:absolute;left:32px;top:240px;display:flex;flex-direction:column;gap:7px;align-items:flex-start}.places button{background:#17231ec0;border-color:#ffffff20;text-align:left;min-width:142px}.places button:before{content:' ';display:inline-block;width:5px;height:5px;border:1px solid #d6cdb6;border-radius:50%;margin-right:12px;margin-bottom:2px}.mini{position:absolute;right:32px;bottom:112px;background:#182522df;border:1px solid #ffffff20;border-radius:12px;padding:12px;width:205px;box-shadow:0 12px 40px #0002}.mini canvas{display:block;width:100%;height:auto;cursor:crosshair}.mini span{display:block;text-align:center;font-size:11px;margin-top:8px;color:#c3c8b9}footer{position:absolute;bottom:max(18px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);text-align:center;white-space:nowrap}.modes{display:flex;gap:3px;border:1px solid #ffffff24;background:#15221ed9;padding:5px;border-radius:12px;width:max-content;margin:auto}.modes button{border:0;background:transparent;padding:13px 24px}.modes button.active{background:#e8dfcc}footer p{font-size:12px;letter-spacing:.03em;margin:9px 0;color:#e1e1d6}footer small{font-size:10px;color:#b4bcae}.move{position:absolute;left:30px;bottom:105px;display:flex;flex-direction:column;align-items:center;gap:5px;touch-action:none}.move[hidden]{display:none}.move div{display:flex;gap:5px}.move button{width:48px;height:48px;padding:0;font-size:23px;user-select:none;-webkit-user-select:none}.move button:active{background:#e8dfcc;color:#182321}#loading,#error{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background:#172822ee;border:1px solid #ffffff22;padding:25px;border-radius:12px;text-align:center;font-size:15px}#loading{display:flex;gap:14px;align-items:center}.spinner{height:18px;width:18px;border:2px solid #ffffff33;border-top-color:#e8dfcc;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}dialog{width:min(1000px,94vw);max-height:88dvh;border:1px solid #687268;background:#1c2b25;color:#f3f2e9;border-radius:15px;padding:22px;box-shadow:0 30px 100px #0009}dialog::backdrop{background:#0009;backdrop-filter:blur(7px)}.dialog-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.dialog-head h2{font-size:20px;font-weight:normal;margin:0}.dialog-head button{font-size:24px;padding:2px 12px}dialog img{display:block;width:100%;height:auto;max-height:65dvh;object-fit:contain}dialog p,dialog dd{font-size:15px;line-height:1.8;color:#c9d0c7}#helpDialog{max-width:540px}dt{margin-top:18px;font-weight:bold}dd{margin:6px 0 0}body.night .view-title p{color:#d4d3cb}@media(max-width:650px){header{left:18px;right:18px;top:max(20px,env(safe-area-inset-top))}.brand{font-size:21px}.brand small{font-size:8px}.top-actions{gap:5px}.top-actions button{padding:9px 11px;font-size:13px}.top-actions button:last-child{width:33px}.view-title{top:96px;left:20px}.view-title h1{font-size:24px;margin:8px 0}.view-title span{font-size:10px}.view-title p{font-size:11px}.right-tools{right:18px;top:185px;gap:5px}.right-tools button{font-size:11px;padding:8px 10px}.places{left:18px;right:18px;top:auto;bottom:135px;display:flex;flex-direction:row;gap:6px;overflow-x:auto;padding:5px 0;scrollbar-width:none}.places button{white-space:nowrap;min-width:unset;font-size:12px;padding:10px}.places button:before{display:none}.mini{width:132px;right:18px;bottom:195px;padding:8px}.mini span{font-size:9px;line-height:1.4;margin-top:4px}.move{left:18px;bottom:195px}.move button{width:40px;height:40px}.modes button{font-size:14px;padding:12px 25px}footer{bottom:max(18px,env(safe-area-inset-bottom))}footer small{font-size:9px}footer p{font-size:11px}.right-tools #reset{display:none}}@media(max-height:550px){.view-title{top:85px}.view-title h1{font-size:22px}.places{top:180px;bottom:auto;left:24px;right:auto;flex-direction:column;gap:4px}.places button{padding:6px 10px;font-size:11px}.mini{width:135px;bottom:95px}.move{left:190px;bottom:35px}footer{bottom:10px}.right-tools{top:85px}}

header{top:max(82px,calc(env(safe-area-inset-top) + 62px))}.view-title{top:171px}.right-tools{top:168px}.places{top:296px}@media(max-width:650px){header{top:max(76px,calc(env(safe-area-inset-top) + 60px))}.view-title{top:152px}.right-tools{top:241px}.places{top:auto}}@media(max-height:550px){header{top:70px}.view-title{top:126px}.right-tools{top:126px}.places{top:208px}}

/* Embedded viewer: controls occupy their own rows, never the model surface. */
body.embedded{display:flex;flex-direction:column;height:100%;background:#182321}
.embedded>header,.embedded>.view-title,.embedded>.places,.embedded>.mini,.embedded>footer{display:none!important}
.embed-bar{display:flex;align-items:center;gap:6px;flex:none;min-height:52px;padding:6px 8px;background:#1b2823;border-bottom:1px solid #ffffff1c;z-index:3}
.embedded .modes{margin:0;flex:none;padding:2px;border-radius:8px;background:#111e19;gap:1px}
.embedded .modes button{min-width:46px;min-height:36px;font-size:13px;padding:6px 10px}
.embed-bar select{min-width:0;flex:1;max-width:180px;min-height:40px;padding:7px 5px;border:1px solid #ffffff35;border-radius:7px;background:#26382f;color:#f6f4eb;font:inherit;font-size:13px}
.embedded .embed-toggle{min-height:40px;padding:7px 10px;margin-left:auto;font-size:13px;flex:none}
.embed-stage{position:relative;flex:1;min-height:0;width:100%;overflow:hidden}
.embedded #scene{position:absolute;inset:0;width:100%;height:100%;touch-action:none}
.embed-hint{flex:none;min-height:26px;padding:5px 6px;background:#1b2823;text-align:center}
.embed-hint p{margin:0;color:#ccd5ca;font-size:10px;line-height:16px}
.embed-options{position:absolute;z-index:5;top:58px;right:8px;max-width:calc(100% - 16px);padding:10px;background:#182821f5;border:1px solid #ffffff40;border-radius:10px;box-shadow:0 8px 24px #0005}
.embed-options[hidden]{display:none}
.embedded .top-actions,.embedded .right-tools{position:static;display:flex;gap:6px;margin:0;pointer-events:auto;flex-wrap:wrap}
.embedded .right-tools{margin-top:8px}.embedded .top-actions button,.embedded .right-tools button{min-height:40px;font-size:12px;padding:8px 11px}.embedded .top-actions button:last-child{width:40px}.embedded .right-tools #reset{display:block}
.embedded .move{left:10px;right:auto;bottom:10px;top:auto;gap:3px}.embedded .move div{gap:3px}.embedded .move button{height:40px;width:40px;background:#182522e8}.embedded .move[hidden]{display:none}
.embedded #loading,.embedded #error{z-index:2;max-width:calc(100% - 24px);width:300px;padding:16px;font-size:13px}.embedded #error h2{font-size:18px}.embedded #error[hidden]{display:none}
.embedded dialog{max-height:calc(100% - 20px);padding:14px}.embedded dialog .dialog-head h2{font-size:17px}.embedded dialog p,.embedded dialog dd{font-size:13px}.embedded dialog img{max-height:55vh}
@media(max-width:360px){.embed-bar{gap:4px;padding:6px}.embedded .modes button{min-width:42px;padding:6px 7px}.embedded .embed-toggle{padding:7px 8px}.embed-bar select{font-size:12px}}
@media(prefers-reduced-motion:reduce){.embedded *{transition:none!important}}
