/* Lighting and full-screen controls in the corner of the 3D view (shared/stage-tools.js).
   Each direction sets --tools-bg, --tools-fg, --tools-fg-2, --tools-line and --tools-accent. */
.stagetools { position: absolute; right: 12px; bottom: 12px; z-index: 6; display: flex; gap: 6px; }
.stagetools__btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; height: 44px;
  padding: 0 12px; border: 1px solid var(--tools-line); border-radius: var(--r-control, 3px); background: var(--tools-bg); color: var(--tools-fg);
  font-size: 14px; font-weight: 700; box-shadow: 0 2px 8px rgb(0 0 0 / 0.18); }
.stagetools__btn svg { width: 20px; height: 20px; flex: none; }
.stagetools__btn--icon { width: 44px; padding: 0; }
.stagetools__btn:hover { border-color: var(--tools-fg-2); }
.stagetools__btn[aria-expanded="true"], .stagetools__btn[aria-pressed="true"] { border-color: var(--tools-accent); box-shadow: inset 0 0 0 1px var(--tools-accent); }
.lightpanel { position: fixed; z-index: 1100; display: grid; gap: 12px; padding: 12px 16px 16px; overflow-y: auto;
  border: 1px solid var(--tools-line); border-radius: var(--r-control, 3px); background: var(--tools-bg); color: var(--tools-fg);
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.3); }
.lightpanel__head { display: flex; align-items: center; gap: 4px; }
.lightpanel__head h2 { font-size: 17px; margin-right: auto; }
.lightpanel__close { display: grid; place-items: center; width: 44px; height: 44px; margin: -4px -10px -4px 0; border: 0;
  border-radius: var(--r-control, 3px); background: none; color: var(--tools-fg-2); }
.lightpanel__close svg { width: 20px; height: 20px; }
.lightpanel__close:hover { color: var(--tools-fg); }
.lightpanel__presets { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.lightpanel__preset { min-height: 44px; padding: 0 10px; border: 1px solid var(--tools-line); border-radius: var(--r-control, 3px); background: none;
  color: inherit; font-size: 14px; text-align: left; }
.lightpanel__preset:hover { border-color: var(--tools-fg-2); }
.lightpanel__preset[aria-checked="true"] { border-color: var(--tools-accent); box-shadow: inset 0 0 0 1px var(--tools-accent); font-weight: 700; }
.lightpanel__about { font-size: 13px; line-height: 1.4; color: var(--tools-fg-2); }
.lightpanel__angle { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; align-items: center; }
.lightpanel__compass { width: 72px; height: 72px; overflow: visible; }
.lightpanel__ring { fill: none; stroke: var(--tools-line); stroke-width: 2; stroke-dasharray: 3 4; }
.lightpanel__car { fill: none; stroke: var(--tools-fg-2); stroke-width: 2.5; }
.lightpanel__nose { fill: none; stroke: var(--tools-fg-2); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.lightpanel__ray { stroke: var(--tools-accent); stroke-width: 2; stroke-dasharray: 2 3; }
.lightpanel__sun { fill: var(--tools-accent); stroke: var(--tools-bg); stroke-width: 2; }
.lightpanel__fields { display: grid; gap: 4px; }
.lightpanel__field { display: grid; font-size: 13px; }
.lightpanel__field > span { display: flex; justify-content: space-between; gap: 8px; }
.lightpanel__field output { color: var(--tools-fg-2); white-space: nowrap; }
.lightpanel input[type="range"] { width: 100%; height: 36px; margin: 0; accent-color: var(--tools-accent); }
.lightpanel__reset { min-height: 44px; padding: 0 8px; border: 0; border-radius: var(--r-control, 3px); background: none; color: var(--tools-fg);
  font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }

/* Full screen fallback where the Fullscreen API is missing (iPhone Safari): the view fills the window. */
.is-expanded { position: fixed !important; inset: 0 !important; z-index: 1000 !important; width: auto !important; height: auto !important;
  margin: 0 !important; border-radius: 0 !important; }
.has-expanded-stage, .has-expanded-stage body { overflow: hidden; }

@media (max-width: 599px) {
  .stagetools { right: 8px; bottom: 8px; }
  .stagetools__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .stagetools__btn { width: 44px; padding: 0; }
}

