body #camera-shortcut{display:block;width:255px;max-width:100%;min-height:40px;margin-top:7px;padding:9px 12px;background:var(--paper,#efdfc0);color:var(--ink,#3d2d20);border:1px solid #ac9066;border-radius:5px;font-size:12px;cursor:pointer;box-shadow:0 2px 5px #37281824}
#camera-options{min-width:0;margin:0 0 16px;padding:0 0 14px;border:0;border-bottom:1px solid #aa8e6566;color:var(--ink,#3d2d20)}#camera-options legend{padding:0;margin-bottom:9px;font-size:13px;font-weight:700}#camera-options>div{display:grid;gap:6px}
#camera-options button{padding:9px 8px;min-height:41px;font:inherit;text-align:left;border:1px solid #b49d78;border-radius:5px;background:#f7ebd5;color:#493c2c;cursor:pointer}#camera-options button[aria-pressed=true]{background:#e1eddf;border:2px solid #416b5a;color:#234b3d;font-weight:700}
#camera-options p{margin:9px 0 5px;font-size:11px;line-height:1.6}#camera-options small{display:block;font-size:10px;line-height:1.6;color:var(--muted,#735b42)}
body #environment-panel{max-height:max(190px,calc(100dvh - 480px))}body.touch-game #environment-panel{max-height:none}body.touch-game #camera-shortcut{width:100%;font-size:13px}
#first-person-reticle{display:none;position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);pointer-events:none;z-index:2;color:#fff9;font:20px sans-serif;text-shadow:0 1px 2px #0008}body[data-camera-view=first]:not(.pocket-open):not(.touch-menu-open) #first-person-reticle{display:block}
/* Open beside the left HUD so the companion never covers settings. */
body:not(.touch-game) #environment-panel{
  position:fixed;left:410px;top:24px;width:340px;
  box-sizing:border-box;max-height:calc(100dvh - 48px);
  overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;
  margin:0;z-index:12;
}
body:not(.touch-game) #environment-panel header{
  position:sticky;top:-1px;z-index:1;background:var(--paper,#efdfc0);padding:8px 0;
}
@media(max-width:900px){
  body:not(.touch-game) #environment-panel{left:16px;top:16px;width:min(340px,calc(100vw - 32px));max-height:calc(100dvh - 32px)}
  body:not(.touch-game):has(#environment-panel:not([hidden])) #pet-panel{visibility:hidden;pointer-events:none}
}
/* Reserve space for the shortcut buttons even in a short desktop window. */
@media(max-height:900px){
  body:not(.touch-game){--companion-bottom:63px;--sidebar-reserved:480px}
  body:not(.touch-game) #pet-panel{max-height:max(80px,calc(100dvh - var(--companion-bottom) - var(--sidebar-reserved)));overflow-y:auto}
}
@media(max-height:900px) and (max-width:1000px){body:not(.touch-game){--companion-bottom:146px}}
@media(max-height:760px){
  body:not(.touch-game){--sidebar-reserved:370px}
  body:not(.touch-game) #defense-status{top:16px;min-height:145px;padding-top:5px;padding-bottom:5px}
  body:not(.touch-game) #environment-controls{top:190px}
}
