/* POINTSTAR virtual scope demo - scoped styles. Everything lives under .psd / .psv so it does not touch the rest of the site.
   Layout: SkyView in the iPad frame (the .lxsv tablet styles from lxstar-demo.css) beside the 3D telescope you push by hand. */

/* the section: tablet left, scope right (the scope needs more room than the LXSTAR handset) */
/* it fills the page's content column (use Full screen for bigger) */
.lxsv.psv { width: 100%; max-width: none; padding-left: 0; padding-right: 0; gap: clamp(14px, 2vw, 28px);
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
.lxsv.psv .lxsv-side { position: static; }
@media (max-width: 900px) { .lxsv.psv { grid-template-columns: minmax(0, 1fr); } }

/* full screen (the button under the scope): both fill the screen, sized so neither needs scrolling */
.lxsv.psv:fullscreen { width: 100vw; height: 100vh; margin: 0; transform: none; padding: 16px 20px; background: #0b0e14; color: #dfe6f2;
  align-items: center; align-content: center; overflow: auto; }
.lxsv.psv:fullscreen .lxsv-app { width: 100%; max-width: calc((100vh - 200px) * 1.4390); justify-self: end; }
.lxsv.psv:fullscreen .psd { width: 100%; max-width: calc((100vh - 140px) * 1.12); justify-self: start; }
.lxsv.psv:fullscreen .lxsv-cap, .lxsv.psv:fullscreen .psd-cap { display: none; }
.lxsv.psv:fullscreen .psd-link { color: #8f9bb0; }
@media (max-width: 900px) { .lxsv.psv:fullscreen .lxsv-app, .lxsv.psv:fullscreen .psd { max-width: none; justify-self: stretch; } }

.psd {
  --psd-bg: #05080e; --psd-ink: #e3e9f3; --psd-dim: #8f9bb0; --psd-line: #1d2739;
  --psd-orange: #FF3114; --psd-amber: #ffb547; --psd-good: #4fdc95;
  --psd-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  font-family: inherit; color: #111; min-width: 0;
}
.psd *, .psd *::before, .psd *::after { box-sizing: border-box; }
.psd .psd-stage {
  position: relative; width: 100%; aspect-ratio: 1.12 / 1; border-radius: 22px; overflow: hidden; background: var(--psd-bg);
  box-shadow: 0 0 0 1px #2b2e33, 0 30px 50px -22px #0007, 0 10px 18px -10px #0004;
}
.psd canvas.psd-gl { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; outline: none; }
.psd canvas.psd-gl.over { cursor: pointer; }
.psd canvas.psd-gl.pushing { cursor: grabbing; }
.psd canvas.psd-gl:focus-visible { box-shadow: inset 0 0 0 2px var(--psd-orange); }

.psd .psd-tip { position: absolute; left: 10px; top: 10px; right: 10px; display: flex; gap: 6px; flex-wrap: wrap; pointer-events: none; }
.psd .psd-tip span { background: rgba(5,8,14,.76); border: 1px solid var(--psd-line); border-radius: 999px; padding: 3px 10px;
  font-size: 12.5px; line-height: 1.5; color: #c3cce0; }
.psd .psd-tip b { color: #fff; font-weight: 600; }
.psd .psd-tip kbd { font-family: var(--psd-mono); font-size: 11px; color: var(--psd-amber); }

.psd .psd-finder { position: absolute; left: 10px; bottom: 10px; width: clamp(96px, 20%, 170px); display: grid; justify-items: center; gap: 3px; pointer-events: none; }
.psd .psd-finder canvas { width: 100%; height: auto; aspect-ratio: 1; border-radius: 50%; border: 2px solid #34445f; box-shadow: 0 0 0 4px rgba(0,0,0,.55); background: #000; }
.psd .psd-finder em { font-style: normal; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--psd-dim); }

/* the POINTSTAR unit itself: its photo, with a live compass card and the firmware's 72x40 OLED screens on top */
.psd .psd-unit { position: absolute; right: 10px; bottom: 10px; width: clamp(92px, 22%, 200px); aspect-ratio: 422 / 513; pointer-events: none;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,.6)); }
.psd .psd-unit img { display: block; width: 100%; height: 100%; user-select: none; }
.psd .psd-unit .psd-dial { position: absolute; left: 32.63%; top: 18.83%; width: 35.58%; height: 29.26%; border-radius: 50%; }
.psd .psd-unit .psd-oled { position: absolute; left: 37.6%; top: 65.55%; width: 25.15%; height: 11.51%; image-rendering: pixelated; image-rendering: crisp-edges;
  box-shadow: 0 0 6px rgba(255,106,20,.25); }
.psd .psd-err { position: absolute; inset: 0; display: grid; place-items: center; padding: 28px; text-align: center; color: var(--psd-dim); font-size: 14px; }

.psd .psd-under { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.psd .psd-under button { border: none; border-radius: 10px; padding: 8px 14px; font-size: 14px; font-family: inherit; cursor: pointer;
  background: #333; color: #ccc; }                                   /* .greybtn */
.psd .psd-under button.primary { background: var(--psd-orange); color: #fff; }   /* .orangebtn */
.psd .psd-under .psd-laser[aria-pressed="false"], .psd .psd-under .psd-names[aria-pressed="false"] { opacity: .65; }
.psd .psd-under button:focus-visible { outline: 2px solid var(--psd-orange); outline-offset: 2px; }
.psd .psd-link { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: #5b6270; }
.psd .psd-led { width: 8px; height: 8px; border-radius: 50%; background: #b9bdc4; }
.psd .psd-led.on { background: #22b36b; box-shadow: 0 0 6px #22b36b; }
.psd .psd-cap { text-align: center; color: #5b6270; font-size: 13px; margin: 8px 0 0; }

@media (max-width: 900px) {
  .psd { max-width: 560px; margin: 0 auto; }
  .psd .psd-stage { aspect-ratio: 1 / 1.05; }
  .psd .psd-tip span:nth-child(3) { display: none; }
}
@media (prefers-reduced-motion: reduce) { .psd * { transition: none !important; } }

/* sky time, under the tablet (on the white page, in the site's own style) */
.psd-time { margin: 12px 6px 0; display: grid; gap: 8px; font-family: inherit; color: #111; }
.psd-time-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.psd-time-label { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #d92810; }
.psd-time-now { font-weight: 600; font-variant-numeric: tabular-nums; }
.psd-time-row { display: flex; gap: 8px; flex-wrap: wrap; }
.psd-time-row button { border: none; border-radius: 30px; padding: 7px 16px; font-size: 14px; font-family: inherit; cursor: pointer; background: #888; color: #fff; }
.psd-time-row button.on { background: #FF3114; }
.psd-time-row button:focus-visible { outline: 2px solid #FF3114; outline-offset: 2px; }
.psd-time-slide { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 13px; color: #5b6270; }
.psd-time-slide input { width: 100%; accent-color: #FF3114; }
.lxsv.psv:fullscreen .psd-time { color: #dfe6f2; }
.lxsv.psv:fullscreen .psd-time-slide { color: #8f9bb0; }

/* "Getting around SkyView" under the tablet, and SkyView's buttons under the scope */
.psv-guide { margin: 18px 6px 0; padding-top: 14px; border-top: 1px dashed #d6d9de; color: #111; }
.psv-guide h4 { margin: 0 0 10px; font-weight: normal; color: #FF3114; }
.psv-guide dl { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; align-content: start; }
.psv-guide dt { font-weight: 700; white-space: nowrap; }
.psv-guide dd { margin: 0; color: #444; font-size: 14px; line-height: 1.45; }
@media (max-width: 480px) { .psv-guide dl { grid-template-columns: minmax(0, 1fr); gap: 2px; } .psv-guide dd { margin-bottom: 8px; } }
.lxsv.psv:fullscreen .psv-guide { display: none; }
