/* An optical preview needs camera controls, not the campaign's simulated HUD. */
body.preview-mode .hud,body.preview-mode .dock,body.preview-mode .mode-button,body.preview-mode .world-hint,body.preview-mode #ui-travel-ready,body.preview-mode #ui-bag{display:none!important}
body.preview-mode .island-caption{top:max(20px,env(safe-area-inset-top));left:max(20px,env(safe-area-inset-left))}
body.preview-mode .view-tools{top:max(20px,env(safe-area-inset-top));right:max(20px,env(safe-area-inset-right))}
.preview-toolbar.preview-bar{top:auto;bottom:max(16px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);display:flex;flex-wrap:nowrap;align-items:center;gap:3px;width:max-content;max-width:calc(100vw - 24px);padding:4px;border:1px solid #fff8;border-radius:14px;background:#f7f2e9f2;box-shadow:0 4px 20px #173a3540;font:12px 'Trebuchet MS','Segoe UI',sans-serif;z-index:24}
.preview-toolbar button,.preview-toolbar summary{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 13px;white-space:nowrap;border:0;border-radius:10px;background:transparent;color:#514057;font:inherit;cursor:pointer;touch-action:manipulation}
.preview-toolbar svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.preview-toolbar summary{list-style:none;background:#e7e9d9;color:#526842}.preview-toolbar summary::-webkit-details-marker{display:none}.preview-toolbar summary>svg:last-child{width:13px;margin-left:3px;transition:rotate .2s}.preview-toolbar details[open] summary>svg:last-child{rotate:180deg}
.preview-toolbar button:hover,.preview-toolbar summary:hover{background:#e8dfeb}.preview-toolbar button:focus-visible,.preview-toolbar summary:focus-visible{outline:2px solid #8e7cac;outline-offset:2px}
.preview-toolbar #preview-back{border-left:1px solid #dcd2d9;border-radius:0 10px 10px 0;color:#695285}
.preview-options{position:absolute;left:0;bottom:calc(100% + 10px);width:300px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 125px);overflow-y:auto;overscroll-behavior:contain;padding:12px;background:#f7f2e9fa;border:1px solid #fff9;border-radius:15px;box-shadow:0 8px 32px #173a3540;animation:preview-options-in .16s ease both}
.preview-options header{padding:7px 10px 12px;border-bottom:1px solid #ddd5db;margin-bottom:5px}.preview-options header small{display:block;font-size:8px;letter-spacing:1.6px;color:#978a98}.preview-options header b{display:block;font:20px Georgia,serif;margin-top:7px}.preview-options header p{font-size:10px;margin:7px 0 0;color:#8b7c91}.preview-options button{justify-content:flex-start;text-align:left;width:100%;min-height:46px;background:transparent;padding:9px 10px}
body.preview-mode #landscape-editor{top:85px;bottom:84px}body.preview-mode #performance-meter{top:72px;right:22px}
@keyframes preview-options-in{from{opacity:0;translate:0 5px}to{opacity:1;translate:0 0}}
@media(max-width:650px){body.preview-mode .island-caption{top:max(16px,env(safe-area-inset-top));left:max(14px,env(safe-area-inset-left));max-width:calc(100vw - 190px)}body.preview-mode .island-caption>span{font-size:19px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}body.preview-mode .island-caption small{font-size:7px;margin-top:4px}body.preview-mode .view-tools{top:max(17px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));gap:4px}body.preview-mode .view-tools button{width:34px;height:34px}.preview-toolbar.preview-bar{bottom:max(10px,env(safe-area-inset-bottom));max-width:calc(100vw - 16px);padding:3px;gap:1px;font-size:11px}.preview-toolbar button,.preview-toolbar summary{min-height:44px;padding:0 9px;gap:6px}.preview-toolbar svg{width:18px;height:18px}.preview-toolbar summary>svg:last-child{width:11px;margin-left:0}.preview-options{width:290px}body.preview-mode #landscape-editor{top:76px;bottom:76px;left:10px}body.preview-mode #performance-meter{top:63px;right:14px;font-size:9px;padding:6px 9px}}
@media(max-height:440px) and (orientation:landscape){.preview-toolbar.preview-bar{bottom:max(8px,env(safe-area-inset-bottom))}.preview-options{max-height:calc(100dvh - 90px)}.preview-options header{padding:3px 9px 8px}.preview-options header b{font-size:17px}.preview-options button{min-height:40px}body.preview-mode #landscape-editor{top:65px;bottom:73px}}
@media(prefers-reduced-motion:reduce){.preview-options{animation:none}.preview-toolbar summary>svg:last-child{transition:none}}
@media(max-width:380px){.preview-toolbar #preview-back,.preview-toolbar #preview-people{min-width:44px;padding:0 10px}.preview-toolbar #preview-back span,.preview-toolbar #preview-people span{display:none}}
