/* Dark theme optimized for night sky use */
:root {
  --bg: #0a0a12;
  --surface: #12121e;
  --surface2: #1a1a2a;
  --text: #e0e0f0;
  --text-muted: #888899;
  --accent: #7090ff;
  --warn: #ffb347;
  --error: #ff6060;
  --ok: #60cc60;
  --border: #2a2a3a;

  /* Sky palette */
  --sky-top:    #05050f;
  --sky-mid:    #0a0e1c;
  --sky-bottom: #0c1322;
  --sky-glow:   rgba(70, 90, 150, 0.18);

  /* Star colors */
  --star-warm:    #ffcc88;
  --star-cool:    #aaddff;
  --star-neutral: #e8eeff;

  /* HUD tokens */
  --hud-bg:   rgba(18, 22, 34, 0.55);
  --hud-line: rgba(150, 170, 210, 0.18);

  /* Layout tokens */
  --border-thin: rgba(150, 170, 200, 0.12);
  --radius-pill: 999px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: 2rem;
}

header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1.6rem 1rem;
  text-align: center;
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

/* Notice bar — always visible */
.notice-bar {
  background: #1a160a;
  border: 1px solid #554422;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
}

.notice-accuracy {
  font-size: 0.85rem;
  color: var(--warn);
}

/* Safety notice — always visible */
.safety-notice {
  background: var(--surface2);
  border: 1px solid rgba(100, 80, 40, 0.3);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.safety-notice h2 {
  color: var(--warn);
  margin-bottom: 0.5rem;
}

.safety-notice ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.safety-notice li {
  font-size: 0.875rem;
  padding-left: 1.25em;
  position: relative;
  color: #ccccaa;
}

.safety-notice li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--warn);
}

/* HTTPS warning */
.warning-section {
  background: #1a0a0a;
  border: 1px solid #663333;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  color: var(--error);
  font-size: 0.875rem;
}

/* Sensor sections */
.sensor-section {
  background: var(--surface);
  border: 1px solid var(--border-thin);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.permission-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.note-placeholder {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* Buttons */
.button-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}

button:hover {
  opacity: 0.85;
}

button:focus-visible,
a:focus-visible,
input[type="range"]:focus-visible {
  outline: 3px solid var(--warn);
  outline-offset: 3px;
}

button:active {
  opacity: 0.7;
}

button:disabled {
  background: var(--surface2);
  color: var(--text-muted);
  cursor: not-allowed;
}

/* Status areas */
.status-area {
  font-size: 0.875rem;
  min-height: 1.5rem;
}

.status-idle { color: var(--text-muted); }
.status-ok   { color: var(--ok); }
.status-error { color: var(--error); }
.status-warn  { color: var(--warn); }

/* Data grid for sensor values */
.data-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.75rem;
  margin-top: 0.25rem;
}

.data-label {
  color: var(--text-muted);
  white-space: nowrap;
  font-size: 0.8rem;
}

.data-value {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-size: 0.875rem;
}

/* Feature detection badge */
.feature-badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  min-height: 1.25rem;
}

.feature-badge.supported {
  background: #0a1a0a;
  color: var(--ok);
  border: 1px solid #2a5a2a;
}

.feature-badge.unsupported {
  background: #1a0a0a;
  color: var(--error);
  border: 1px solid #5a2a2a;
}

/* Accuracy status */
.accuracy-area {
  font-size: 0.875rem;
  min-height: 1.5rem;
}

.accuracy-level {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
}

.accuracy-high { background: #0a1a0a; color: var(--ok); }
.accuracy-mid  { background: #1a1500; color: var(--warn); }
.accuracy-low  { background: #1a0a0a; color: var(--error); }

.accuracy-detail {
  color: var(--text-muted);
  display: inline-block;
  font-size: 0.8rem;
  margin-left: 0.6rem;
}

/* Manual correction sliders */
.slider-group {
  margin-bottom: 0.75rem;
}

.slider-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

input[type="range"] {
  width: 100%;
  min-height: 44px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Manual mode notice (shown on permission denied) */
.manual-notice {
  background: #0a120a;
  border: 1px solid #2a5a2a;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.manual-notice h2 {
  color: var(--ok);
  margin-bottom: 0.5rem;
}

.manual-notice p {
  font-size: 0.875rem;
  color: #aaccaa;
  line-height: 1.6;
}

footer {
  text-align: center;
  padding: 1.5rem 1rem 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Header page description (manual mode) */
.page-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  line-height: 1.5;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* Compass tick labels under heading slider */
.compass-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
  padding: 0 2px;
}

/* Sky canvas wrapper — responsive */
.sky-canvas-wrap {
  width: 100%;
  margin-bottom: 0.5rem;
}

.sky-canvas {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #050510;
}

/* Caption under sky canvas */
.sky-caption {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.4rem;
  line-height: 1.5;
}

/* Current time display */
.manual-time-display {
  font-size: 1.4rem;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  margin: 0.2rem 0 0.4rem;
  font-weight: 600;
}

/* Navigation section */
.nav-section {
  margin-bottom: 1rem;
}

.nav-link {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.5rem 0;
}

.nav-link:hover {
  text-decoration: underline;
  opacity: 0.85;
}

/* Legacy nav button style */
.nav-btn {
  display: inline-block;
  text-decoration: none;
}

/* === MVP 1-B: sample display additions === */

.sample-notice {
  background: #0d0d1a;
  border: 1px solid #2a3060;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin: 0.75rem 0;
  font-size: 0.82rem;
  color: #99aacc;
  line-height: 1.55;
}

.sample-notice strong {
  color: #aabbee;
}

.display-controls-section .display-controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toggle-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text);
  cursor: pointer;
  min-height: 44px;
  padding: 0.1rem 0;
}

.toggle-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.sample-guide {
  font-size: 0.82rem;
  color: #99aacc;
  line-height: 1.55;
}

.sample-guide p {
  margin-bottom: 0.5rem;
}

.sample-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  align-items: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #aaddff;
  flex-shrink: 0;
}

.legend-label-icon {
  font-style: italic;
  font-size: 0.82rem;
  color: rgba(180, 200, 255, 0.7);
}

.legend-note {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* === MVP 1-C: UX hardening additions === */

/* Sky hero section — stronger border to frame the canvas */
.sky-hero-section {
  border-color: #2a3060;
}

/* Value badges above canvas */
.value-badges {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.value-badge {
  flex: 1;
  background: #0d0d1e;
  border: 1px solid #2a3060;
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  text-align: center;
  min-width: 0;
}

.value-badge-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.value-badge-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  white-space: nowrap;
}

/* Shortcut button groups */
.shortcut-group {
  margin-bottom: 0.6rem;
}

.shortcut-group-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.shortcut-row {
  display: flex;
  gap: 0.4rem;
}

.shortcut-btn {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.5rem;
  font-size: 0.875rem;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  min-height: 44px;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.1s, border-color 0.1s;
}

.shortcut-btn:hover {
  background: #1e1e32;
  border-color: var(--accent);
}

.shortcut-btn:focus-visible {
  outline: 3px solid var(--warn);
  outline-offset: 3px;
}

.shortcut-btn:active {
  background: #1a1a2e;
  opacity: 0.85;
}

/* Hint text below canvas */
.hint-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.4rem;
  padding: 0.35rem 0;
  line-height: 1.5;
}

/* Viewer launch button row in manual.html */
.viewer-launch-row {
  text-align: center;
  margin-top: 1rem;
}

.viewer-launch-btn {
  display: inline-block;
  width: 100%;
  max-width: 360px;
  font-size: 1rem;
  padding: 0.75rem 1.25rem;
  min-height: 48px;
}

/* ============================================================
   Viewer page (viewer.html)
   body.viewer-body overrides the normal scrollable layout
   ============================================================ */

body.viewer-body {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
  background: #050510;
}

body.viewer-body main,
body.viewer-body header,
body.viewer-body footer {
  display: none;
}

.viewer-canvas-fill {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}

.viewer-canvas-fill:active {
  cursor: grabbing;
}

.viewer-overlay {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 0 16px;
  pointer-events: none;
}

.viewer-overlay > * {
  pointer-events: auto;
}

.viewer-overlay--top {
  top: 0;
  padding-top: 12px;
  padding-top: max(12px, env(safe-area-inset-top, 12px));
  padding-bottom: 14px;
  background: linear-gradient(to bottom, rgba(5, 5, 16, 0.9) 0%, rgba(5, 5, 16, 0.0) 100%);
}

.viewer-overlay--bottom {
  bottom: 0;
  padding-bottom: 12px;
  padding-bottom: max(12px, env(safe-area-inset-bottom, 12px));
  padding-top: 16px;
  background: linear-gradient(to top, rgba(5, 5, 16, 0.9) 0%, rgba(5, 5, 16, 0.0) 100%);
}

/* --- Top overlay: main-screen identity + HUD --- */
.viewer-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.viewer-title-block {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.viewer-app-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.viewer-app-subtitle {
  font-size: 0.78rem;
  color: rgba(180, 200, 255, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.viewer-sample-badge {
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 10px;
  background: rgba(90, 70, 30, 0.55);
  color: #ffce8a;
  border: 1px solid rgba(170, 130, 60, 0.5);
  white-space: nowrap;
  flex-shrink: 0;
}

.viewer-hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.viewer-hud-item {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  background: rgba(10, 12, 30, 0.5);
  border: 1px solid rgba(60, 80, 140, 0.4);
  border-radius: 8px;
  padding: 3px 9px;
}

.viewer-hud-label {
  font-size: 0.60rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.viewer-hud-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(190, 205, 255, 0.95);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.viewer-zenith-note {
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 10px;
  background: rgba(50, 40, 80, 0.55);
  color: #c8b8ff;
  white-space: nowrap;
}

.viewer-intro {
  margin: 6px 0 0;
  font-size: 0.74rem;
  line-height: 1.5;
  color: rgba(170, 185, 220, 0.8);
}

/* --- Center swipe hint (auto-hides after first swipe) --- */
.viewer-swipe-hint {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  bottom: unset;
  z-index: 9;
  text-align: center;
  pointer-events: none;
  padding: 0 16px;
  transition: opacity 0.4s ease;
  width: max-content;
  max-width: calc(100vw - 32px);
}

.viewer-swipe-hint--hidden {
  opacity: 0;
}

.viewer-swipe-hint p {
  display: inline-block;
  font-size: 0.74rem;
  color: rgba(190, 200, 230, 0.62);
  margin: 0 auto 4px;
  padding: 4px 12px;
  background: rgba(5, 5, 16, 0.4);
  border-radius: 10px;
  max-width: 100%;
}

.viewer-swipe-hint p:last-child {
  margin-bottom: 0;
}

/* --- Bottom overlay: operation panel --- */
.viewer-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

/* MVP 13-K-QA-Followup-C: home-screen style control pager. The pager keeps
   CSS scroll-snap; tab buttons add direct navigation without changing controls. */
.viewer-control-groups {
  min-width: 0;
  max-width: 100%;
  margin-bottom: 10px;
}

.viewer-control-page-tabs {
  display: flex;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  padding: 0 2px 8px;
}

.viewer-control-tab {
  appearance: none;
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  padding: 8px 7px;
  border: 1px solid rgba(80, 100, 160, 0.48);
  border-radius: var(--radius-pill);
  background: rgba(120, 150, 220, 0.1);
  color: rgba(210, 222, 255, 0.9);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.viewer-control-tab[aria-selected="true"],
.viewer-control-tab--active {
  border-color: rgba(155, 178, 255, 0.78);
  background: rgba(120, 150, 220, 0.24);
  color: rgba(246, 249, 255, 0.98);
  box-shadow: inset 0 0 0 1px rgba(220, 230, 255, 0.16);
}

.viewer-control-tab:focus-visible {
  outline: 2px solid rgba(170, 200, 255, 0.9);
  outline-offset: 2px;
}

.viewer-control-tab:active {
  transform: translateY(1px);
}

.viewer-control-pager {
  display: flex;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  margin: 0 -2px;
  padding: 1px 2px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-padding-inline: 2px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.viewer-control-pager::-webkit-scrollbar { height: 6px; }

.viewer-control-pager::-webkit-scrollbar-thumb {
  background: rgba(130, 155, 230, 0.45);
  border-radius: 999px;
}

.viewer-control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(80, 100, 160, 0.45);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.viewer-control-page {
  flex: 0 0 min(22rem, calc(100% - 1.25rem));
  max-width: calc(100% - 1.25rem);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.viewer-control-group[hidden],
.viewer-additional-overlay[hidden] {
  display: none;
}

.viewer-control-group-title {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.3;
  font-weight: 700;
  color: rgba(220, 230, 255, 0.96);
}

.viewer-control-group .viewer-controls,
.viewer-control-group.viewer-current-sky {
  margin-bottom: 0;
}

.viewer-control-page .viewer-toggles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.viewer-control-page .viewer-toggles-title {
  grid-column: 1 / -1;
}

.viewer-control-page .viewer-toggle-item--pill {
  justify-content: flex-start;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.viewer-control-page .viewer-toggle-item--pill span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.viewer-control-page .viewer-star-mode,
.viewer-additional-overlay {
  padding: 8px;
  border: 1px solid rgba(80, 100, 160, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.viewer-control-page .viewer-star-mode-options {
  flex: 1 1 100%;
}

.viewer-control-page .viewer-star-mode-option {
  flex: 1 1 0;
}

.viewer-control-page .viewer-star-mode-option span {
  width: 100%;
  padding-inline: 8px;
}

.viewer-control-page .viewer-current-sky-fields {
  align-items: stretch;
}

.viewer-control-page .viewer-current-sky-field {
  flex: 1 1 7rem;
}

.viewer-control-page .viewer-current-sky-field--preset,
.viewer-control-page .viewer-current-sky-update,
.viewer-control-page .viewer-current-sky-help {
  flex-basis: 100%;
}

.viewer-control-page .viewer-current-sky-input,
.viewer-control-page .viewer-current-sky-select {
  width: 100%;
}

.viewer-additional-overlay {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.viewer-additional-overlay + .viewer-additional-overlay {
  border-top: 1px solid rgba(80, 100, 160, 0.34);
}

.viewer-moon-learning-panel[hidden] {
  display: none;
}

.viewer-moon-learning-panel {
  display: grid;
  gap: 4px;
  min-width: 0;
  margin-top: 4px;
  padding: 7px 0 0 9px;
  border-left: 2px solid rgba(160, 190, 255, 0.48);
}

.viewer-moon-learning-title,
.viewer-moon-learning-status,
.viewer-moon-learning-phase,
.viewer-moon-learning-hint,
.viewer-moon-learning-note {
  max-width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
}

.viewer-moon-learning-title {
  font-size: 0.78rem;
  line-height: 1.35;
  font-weight: 700;
  color: rgba(228, 235, 255, 0.96);
}

.viewer-moon-learning-status,
.viewer-moon-learning-phase,
.viewer-moon-learning-hint,
.viewer-moon-learning-note {
  font-size: 0.74rem;
  line-height: 1.5;
  color: rgba(190, 204, 235, 0.9);
}

.viewer-moon-learning-phase {
  font-weight: 700;
  color: rgba(224, 233, 255, 0.96);
}

.viewer-moon-learning-note {
  color: rgba(165, 181, 214, 0.82);
}

.viewer-drawer > .viewer-actions {
  justify-content: flex-end;
  margin: 0 0 8px;
}

@media (max-width: 420px) {
  .viewer-control-group {
    padding: 9px;
    gap: 7px;
  }

  .viewer-drawer > .viewer-actions {
    align-items: stretch;
  }

  .viewer-drawer > .viewer-actions .viewer-reset-btn-el {
    width: 100%;
  }
}
.viewer-toggles {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* MVP 9-A: small visible heading for the display-layer toggle group (表示レイヤー).
   Mirrors .viewer-star-mode-title; aligned with the 44px pill rows. */
.viewer-toggles-title {
  align-self: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(200, 212, 240, 0.95);
}

/* MVP 9-A: learning-only disclaimer line for the 星座イメージ layer. Shown by
   viewer.js only while the layer is ON in the real-star preview. Mirrors the
   muted note styles; no url(), no external refs. */
.viewer-constellation-artwork-status {
  margin: -2px 0 8px;
  font-size: 0.74rem;
  color: rgba(170, 185, 220, 0.8);
}

.viewer-constellation-artwork-status[hidden] { display: none; }

.viewer-toggle-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  color: rgba(190, 205, 255, 0.85);
  cursor: pointer;
  min-height: 44px;
  user-select: none;
}

.viewer-toggle-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.viewer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.viewer-reset-btn-el {
  font-size: 0.82rem;
  padding: 8px 16px;
  min-height: 44px;
  flex-shrink: 0;
}

/* MVP 3-D: real-star display-density control (主要 / 標準 / たくさん). Revealed by
   viewer.js only in real-star preview; segmented pill radios reuse existing HUD
   tokens. No url(), no external refs. The visible segment is the <span> so the
   checked state works via :checked + span (no :has needed). */
.viewer-star-mode {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 8px;
}

.viewer-star-mode[hidden] { display: none; }

.viewer-star-mode-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(200, 212, 240, 0.95);
}

.viewer-star-mode-options {
  display: inline-flex;
  border: 1px solid var(--hud-line);
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.viewer-star-mode-option {
  display: inline-flex;
  cursor: pointer;
  margin: 0;
}

.viewer-star-mode-option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px 15px;
  font-size: 0.82rem;
  color: rgba(190, 205, 255, 0.85);
  user-select: none;
  transition: background 0.12s, color 0.12s;
}

.viewer-star-mode-option + .viewer-star-mode-option span {
  border-left: 1px solid var(--hud-line);
}

/* Visually hidden radio: still focusable for keyboard + screen readers. */
.viewer-star-mode-option input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.viewer-star-mode-option input[type="radio"]:checked + span {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.viewer-star-mode-option input[type="radio"]:focus-visible + span {
  outline: 3px solid var(--warn);
  outline-offset: -3px;
}

.viewer-star-mode-note {
  flex-basis: 100%;
  margin: 2px 0 0;
  font-size: 0.74rem;
  color: rgba(170, 185, 220, 0.8);
}

/* MVP 7-A: 現在空の目安 (current-sky guide) opt-in section. Revealed by viewer.js
   only in the real-star preview; the lat/lon fields stay collapsed until enabled.
   Additive only — reuses existing HUD tokens, no url(), no external refs. Compact
   so it stays usable at 375px (fields wrap, 44px touch targets). */
.viewer-current-sky {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.viewer-current-sky[hidden] { display: none; }

.viewer-current-sky-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 12px;
}

.viewer-current-sky-fields[hidden] { display: none; }

.viewer-current-sky-field {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
}

.viewer-current-sky-field-label {
  font-size: 0.74rem;
  color: rgba(190, 205, 255, 0.85);
}

.viewer-current-sky-input {
  width: 6.5rem;
  min-height: 44px;
  padding: 6px 10px;
  font-size: 0.9rem;
  color: rgba(225, 233, 255, 0.95);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hud-line);
  border-radius: var(--radius-pill);
}

.viewer-current-sky-input:focus-visible {
  outline: 3px solid var(--warn);
  outline-offset: -1px;
}

.viewer-current-sky-update {
  font-size: 0.82rem;
  padding: 8px 14px;
  min-height: 44px;
  flex-shrink: 0;
}

.viewer-current-sky-note {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.5;
  color: rgba(170, 185, 220, 0.8);
}

/* MVP 7-B: city preset selector + sign helper for the current-sky section. The
   <select> mirrors the lat/lon inputs (44px touch target, pill); the helper note
   is full-width so it drops to its own line in the wrapping fields flex. Additive
   only — reuses existing tokens, no url(), no external refs. */
.viewer-current-sky-field--preset { flex: 0 1 auto; }

.viewer-current-sky-select {
  min-width: 7.5rem;
  max-width: 100%;
  min-height: 44px;
  padding: 6px 10px;
  font-size: 0.9rem;
  color: rgba(225, 233, 255, 0.95);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--hud-line);
  border-radius: var(--radius-pill);
}

.viewer-current-sky-select:focus-visible {
  outline: 3px solid var(--warn);
  outline-offset: -1px;
}

.viewer-current-sky-help {
  flex-basis: 100%;
  margin: 2px 0 0;
  font-size: 0.74rem;
  line-height: 1.5;
  color: rgba(170, 185, 220, 0.8);
}

/* MVP 7-C: current-sky active-state badge (drawer) + gated top cue. The badge is a
   compact labeled readout near the toggle (visible whether the fields are open or
   collapsed); the cue is a modest top-overlay pill shown only while a real current-sky
   transform is applied (ON + valid). Additive only — reuses existing tokens, no url(),
   no external refs. Shrink-wrapped + max-width so they never overflow at 375px. */
.viewer-current-sky-summary {
  align-self: flex-start;
  max-width: 100%;
  margin: 0;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
  color: rgba(214, 226, 255, 0.95);
  background: rgba(120, 150, 220, 0.14);
  border: 1px solid var(--hud-line);
  border-radius: var(--radius-pill);
}

.viewer-current-sky-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  max-width: 100%;
  margin-top: 6px;
  padding: 4px 10px;
  background: rgba(120, 150, 220, 0.16);
  border: 1px solid var(--hud-line);
  border-radius: var(--radius-pill);
}

.viewer-current-sky-cue[hidden] { display: none; }

.viewer-current-sky-cue-main {
  font-size: 0.76rem;
  font-weight: 600;
  color: rgba(220, 230, 255, 0.96);
}

.viewer-current-sky-cue-sub {
  font-size: 0.68rem;
  color: rgba(180, 195, 230, 0.85);
}

.viewer-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 6px 12px;
  font-size: 0.82rem;
  color: rgba(170, 190, 255, 0.9);
  text-decoration: none;
  border: 1px solid rgba(80, 100, 160, 0.5);
  border-radius: 6px;
  white-space: nowrap;
}

.viewer-back-link:hover {
  background: rgba(40, 50, 90, 0.4);
}

.viewer-back-link:focus-visible {
  outline: 3px solid var(--warn);
  outline-offset: 3px;
}

.viewer-safety-note {
  font-size: 0.7rem;
  color: rgba(150, 160, 190, 0.7);
  text-align: center;
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

/* === MVP 1-D: sample viewer entry on index.html === */
.viewer-entry-btn {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  padding: 0.75rem 1.25rem;
  min-height: 48px;
  font-size: 1rem;
  text-align: center;
  text-decoration: none;
  line-height: 1.4;
}

.viewer-entry-btn:hover {
  opacity: 0.85;
}

.viewer-entry-btn:focus-visible {
  outline: 3px solid var(--warn);
  outline-offset: 3px;
}

.viewer-entry-section--ready {
  border-color: rgba(94, 201, 160, 0.55);
  box-shadow: 0 0 0 1px rgba(94, 201, 160, 0.16);
}

.viewer-entry-btn--ready {
  background: var(--ok);
  box-shadow: 0 0 0 1px rgba(94, 201, 160, 0.35), 0 8px 22px rgba(94, 201, 160, 0.2);
}

/* === MVP 1-Fb: viewer-first production redesign === */

/* Glassy pill HUD chip (案C) */
.viewer-hud-item--pill {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  background: var(--hud-bg);
  border: 1px solid var(--hud-line);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Pill-style toggle (案C) */
.viewer-toggle-item--pill {
  padding: 5px 11px;
  border: 1px solid var(--hud-line);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  min-height: 44px;
  font-size: 0.80rem;
}

/* Ghost pill button (案C) — for reset + back link */
.viewer-btn-ghost {
  background: transparent;
  border: 1px solid var(--hud-line);
  border-radius: var(--radius-pill);
  color: rgba(170, 190, 255, 0.9);
  padding: 7px 16px;
  min-height: 44px;
  font-size: 0.82rem;
}

/* Large glyph inside swipe hint */
.swipe-hint-glyph {
  display: block;
  font-size: 1.8rem;
  opacity: 0.75;
  color: rgba(174, 224, 255, 0.85);
  letter-spacing: 0.3em;
  margin-bottom: 6px;
}

/* index.html CTA section (viewer-first) */
.index-cta-section {
  background: linear-gradient(135deg, #080814 0%, #0d1020 100%);
  border: 1px solid rgba(112, 144, 255, 0.25);
  border-radius: 12px;
  padding: 1.5rem 1.25rem;
  margin-top: 0.75rem;
  margin-bottom: 1rem;
  text-align: center;
}

.index-cta-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.index-cta-section .sample-notice-inline {
  font-size: 0.80rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

/* Secondary nav button (lighter than primary) */
.nav-btn-secondary {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  color: rgba(160, 180, 255, 0.85);
  border: 1px solid var(--border-thin);
  border-radius: 8px;
  padding: 0.65rem 1rem;
  min-height: 44px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-btn-secondary:hover {
  background: rgba(112, 144, 255, 0.06);
  border-color: rgba(112, 144, 255, 0.3);
}

.nav-btn-secondary:focus-visible {
  outline: 3px solid var(--warn);
  outline-offset: 3px;
}

/* Section title style for manual.html headings (案B) */
.setup-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* === MVP 1-G: top / sensor setup split === */

/* index.html: secondary CTA spacing inside .index-cta-section */
.index-cta-secondary {
  margin-top: 0.5rem;
  margin-bottom: 0;
}

/* index.html: tertiary viewer text link inside .index-cta-section */
.index-cta-viewer-link {
  display: block;
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
}

.index-cta-viewer-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.index-cta-viewer-link:focus-visible {
  outline: 3px solid var(--warn);
  outline-offset: 3px;
}

/* sensor.html: block-level centered back link */
.nav-link-block {
  display: block;
  text-align: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.5rem 0 0.25rem;
}

.nav-link-block:hover {
  color: var(--accent);
  text-decoration: underline;
}

.nav-link-block:focus-visible {
  outline: 3px solid var(--warn);
  outline-offset: 3px;
}

/* Inline safety reminder near viewer launch button */
.safety-hint-inline {
  font-size: 0.75rem;
  color: var(--warn);
  text-align: center;
  margin-top: 0.6rem;
  margin-bottom: 0.15rem;
  padding: 0.2rem 0.5rem;
  line-height: 1.5;
}

/* ============================================================
   MVP 1-H: landing hero + setup-page parity
   ============================================================ */

/* --- index.html landing --- */
.index-main {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* Hero: local decorative SVG backdrop + readable foreground */
.index-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(112, 144, 255, 0.22);
  border-radius: 14px;
  margin: 0.5rem 0 1.25rem;
  min-height: 230px;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(135deg, #06070f 0%, #0b0f1e 100%);
}

.index-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  pointer-events: none;
}

.index-hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 2.5rem 1.25rem 1.4rem;
  background: linear-gradient(to top, rgba(5, 5, 16, 0.88) 0%, rgba(5, 5, 16, 0.0) 100%);
}

.index-hero-title {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.index-hero-tagline {
  font-size: 0.95rem;
  color: #c8d2f0;
  margin-top: 0.35rem;
  line-height: 1.5;
}

.index-hero-sample {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  line-height: 1.5;
}

/* Two equal choice cards (主導線) */
.index-choices {
  margin-bottom: 1.25rem;
}

.index-choices--primary {
  margin-top: 0.1rem;
  margin-bottom: 1.25rem;
}

.index-choices-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 0.85rem;
}

.index-choice-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.index-choice-card {
  display: block;
  text-decoration: none;
  background: linear-gradient(135deg, #0a0c18 0%, #0f1326 100%);
  border: 1px solid rgba(112, 144, 255, 0.28);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  min-height: 64px;
  transition: border-color 0.15s, background 0.15s;
}

.index-choice-card:hover {
  border-color: rgba(112, 144, 255, 0.5);
  background: linear-gradient(135deg, #0c0f1f 0%, #131838 100%);
}

.index-choice-card:focus-visible {
  outline: 3px solid var(--warn);
  outline-offset: 3px;
}

.index-choice-name {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
}

.index-choice-name::after {
  content: " →";
  color: rgba(160, 180, 255, 0.7);
}

.index-choice-desc {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  line-height: 1.5;
}

.index-choice-note {
  font-size: 0.78rem;
  color: #aab2cc;
  line-height: 1.6;
  margin-top: 0.85rem;
  padding: 0.55rem 0.7rem;
  border-left: 2px solid rgba(112, 144, 255, 0.35);
  background: rgba(112, 144, 255, 0.05);
  border-radius: 0 6px 6px 0;
}

.index-choice-note strong {
  color: #c6d2f2;
}

/* About / atmosphere block */
.index-about {
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: #aab2cc;
  line-height: 1.6;
}

.index-about h2 {
  margin-bottom: 0.4rem;
}

.index-about p {
  margin-bottom: 0.5rem;
}

/* --- shared setup-page "このページでできること" intro --- */
.page-intro {
  background: rgba(112, 144, 255, 0.05);
  border: 1px solid var(--border-thin);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin: 0.75rem 0;
}

.page-intro h2 {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}

.page-intro p {
  font-size: 0.85rem;
  color: #aab2cc;
  line-height: 1.55;
}

/* --- shared setup-page section heading rhythm (sensor + manual) --- */
.sensor-section > h2 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ============================================================
   MVP 1-I: graphical UI polish
   Additive only. Reuses existing tokens; restyles presentational
   classes. Structure / IDs the JS reads are untouched.
   ============================================================ */

:root {
  --tone-sensor: #7090ff;   /* blue   — sensor route / compass */
  --tone-manual: #5ec9a0;   /* teal   — manual route / telescope */
  --tone-viewer: #b89cff;   /* violet — viewer route / planet */
  --panel-grad-a: #0a0c18;
  --panel-grad-b: #0f1326;
}

/* --- index branded header --- */
.site-header {
  background: transparent;
  border-bottom: 0;
  padding: 0.25rem 0 0.75rem;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.brand-sub {
  font-size: 0.66rem;
  color: var(--text-muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: 0.25rem 1rem;
  flex-wrap: wrap;
}

.site-nav a {
  font-size: 0.8rem;
  color: rgba(170, 185, 220, 0.85);
  text-decoration: none;
  padding: 0.35rem 0.2rem;
  white-space: nowrap;
}

.site-nav a:hover { color: var(--accent); }

.site-nav a:focus-visible {
  outline: 3px solid var(--warn);
  outline-offset: 2px;
}

/* --- hero additions --- */
.index-hero { min-height: 250px; }

.index-hero-blurb {
  font-size: 0.8rem;
  color: #aeb8d4;
  margin-top: 0.55rem;
  line-height: 1.6;
  max-width: 40ch;
}

.hero-sample-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.7rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  background: rgba(112, 144, 255, 0.12);
  border: 1px solid rgba(112, 144, 255, 0.32);
  font-size: 0.74rem;
  color: #cdd6ea;
}

.hero-sample-star { width: 16px; height: 16px; flex-shrink: 0; }

/* --- route cards --- */
.route-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.route-card {
  --rc: var(--tone-sensor);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-decoration: none;
  background: linear-gradient(135deg, var(--panel-grad-a) 0%, var(--panel-grad-b) 100%);
  border: 1px solid rgba(112, 144, 255, 0.2);
  border-left: 3px solid var(--rc);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.route-card--sensor { --rc: var(--tone-sensor); }
.route-card--manual { --rc: var(--tone-manual); }
.route-card--viewer { --rc: var(--tone-viewer); }

.route-card:hover {
  border-color: var(--rc);
  background: linear-gradient(135deg, #0c0f1f 0%, #141938 100%);
}

.route-card:focus-visible {
  outline: 3px solid var(--warn);
  outline-offset: 3px;
}

.route-card-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.route-card-icon {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  padding: 7px;
  border-radius: 12px;
  background: rgba(8, 10, 22, 0.6);
  border: 1px solid var(--rc);
}

.route-card-titles { display: flex; flex-direction: column; min-width: 0; }

.route-card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.route-card-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.route-card-tag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 0.3rem;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: rgba(184, 156, 255, 0.16);
  border: 1px solid rgba(184, 156, 255, 0.5);
  color: #d8c8ff;
  letter-spacing: 0.04em;
}

.route-card-desc {
  font-size: 0.82rem;
  color: #aab2cc;
  line-height: 1.55;
}

.route-card-cta {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--rc);
  align-self: flex-end;
}

/* ============================================================
   MVP 15-A: observation session entry flow
   Static parent-child entry section for public route pages. No JS.
   ============================================================ */
.observation-entry {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  min-width: 0;
  margin: 0 0 1.25rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid rgba(150, 176, 255, 0.24);
  border-left: 3px solid var(--tone-viewer);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--panel-grad-a) 0%, var(--panel-grad-b) 100%);
}

.observation-entry--guide {
  margin-top: 0;
}

.observation-entry-title,
.observation-entry-summary,
.observation-entry-step,
.observation-entry-note {
  max-width: 100%;
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.observation-entry-title {
  font-size: 1.05rem;
  line-height: 1.4;
  font-weight: 700;
  color: #d8c8ff;
  letter-spacing: 0.02em;
}

.observation-entry-summary,
.observation-entry-note {
  font-size: 0.84rem;
  line-height: 1.65;
  color: #b3bcd8;
}

.observation-entry-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.observation-entry-step {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.75rem 0.8rem;
  border: 1px solid rgba(112, 144, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.observation-entry-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 1.6rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  border: 1px solid rgba(184, 156, 255, 0.45);
  background: rgba(184, 156, 255, 0.12);
  color: #e6d8ff;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.observation-entry-step-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.observation-entry-step-body strong {
  color: #e4ebff;
  font-size: 0.86rem;
  line-height: 1.45;
}

.observation-entry-step-body span {
  color: #aab2cc;
  font-size: 0.8rem;
  line-height: 1.55;
}

.observation-entry-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}

.observation-entry-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(112, 144, 255, 0.36);
  border-radius: 8px;
  background: rgba(112, 144, 255, 0.08);
  color: rgba(214, 226, 255, 0.96);
  text-align: center;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.observation-entry-actions a:hover {
  border-color: rgba(112, 144, 255, 0.62);
  color: var(--accent);
}

.observation-entry-actions a.observation-entry-launch {
  border-color: rgba(255, 179, 71, 0.54);
  background: rgba(255, 179, 71, 0.1);
  color: #ffe3ae;
}

.observation-entry-actions a.observation-entry-launch:hover {
  border-color: rgba(255, 179, 71, 0.78);
  color: #fff0c7;
}

.observation-entry-actions a:focus-visible {
  outline: 3px solid var(--warn);
  outline-offset: 2px;
}

.observation-entry-note {
  padding: 0.6rem 0.7rem;
  border-left: 2px solid rgba(255, 179, 71, 0.42);
  border-radius: 0 6px 6px 0;
  background: rgba(255, 179, 71, 0.06);
  color: #c8c1aa;
}

@media (min-width: 560px) {
  .observation-entry-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .observation-entry-actions {
    flex-direction: row;
  }

  .observation-entry-actions a {
    flex: 1 1 0;
  }
}

@media (max-width: 420px) {
  .observation-entry {
    padding: 1rem;
  }

  .observation-entry-step {
    padding: 0.7rem;
  }
}
/* --- できること feature cards --- */
.features { margin-bottom: 1.25rem; }

.features-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
  text-align: center;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-thin);
  border-radius: 12px;
}

.feature-icon { width: 32px; height: 32px; }

.feature-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.feature-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- calm safety / privacy panels (shared: index / sensor / manual) --- */
.safety-notice--panel {
  background: linear-gradient(135deg, #0a0e1c 0%, #0d1124 100%);
  border: 1px solid rgba(112, 144, 255, 0.22);
}

.safety-notice--panel .safety-notice-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #c6d2f2;
}

.safety-notice-title::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background: url(../img/icon-shield.svg) no-repeat center / contain;
}

.safety-notice--panel li { color: #b6c0da; }

.privacy-line {
  font-size: 0.78rem;
  color: #9aa6c6;
  line-height: 1.6;
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-thin);
}

/* --- sensor: numbered status cards --- */
.setup-steps { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1rem; }

.status-card { margin-bottom: 0; }

.status-card-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.status-card-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(112, 144, 255, 0.12);
  border: 1px solid rgba(112, 144, 255, 0.4);
}

.status-card-icon { width: 34px; height: 34px; flex-shrink: 0; }

.status-card-head h2 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0;
}

/* idle status rendered as a quiet chip (success states inject .data-grid) */
.status-area .status-idle {
  display: inline-block;
  padding: 0.18rem 0.6rem;
  border-radius: var(--radius-pill);
  background: rgba(150, 170, 210, 0.08);
  border: 1px solid var(--border-thin);
  font-size: 0.78rem;
}

/* --- sensor: fallback + privacy + detail group --- */
.fallback-card {
  background: #0a120a;
  border: 1px solid #2a5a2a;
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}

.fallback-card h2 { color: var(--ok); margin-bottom: 0.4rem; }

.fallback-card p { font-size: 0.85rem; color: #aaccaa; line-height: 1.6; margin-bottom: 0.6rem; }

.fallback-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  border: 1px solid rgba(96, 204, 96, 0.5);
  color: #bfe6bf;
  text-decoration: none;
  font-size: 0.9rem;
}

.fallback-link:hover { background: rgba(96, 204, 96, 0.08); }
.fallback-link:focus-visible { outline: 3px solid var(--warn); outline-offset: 3px; }

.privacy-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: linear-gradient(135deg, #0a0e1c 0%, #0d1124 100%);
  border: 1px solid rgba(112, 144, 255, 0.22);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}

.privacy-card-icon { width: 30px; height: 30px; flex-shrink: 0; }
.privacy-card-body h2 { color: #c6d2f2; margin-bottom: 0.3rem; }
.privacy-card-body p { font-size: 0.82rem; color: #9aa6c6; line-height: 1.6; }

.detail-group { margin-bottom: 1rem; }

.detail-group-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  padding-left: 0.2rem;
}

.detail-card h3 {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

/* --- manual: graphical control panel --- */
.sky-frame {
  padding: 10px;
  border-radius: 14px;
  background: linear-gradient(135deg, #070a16 0%, #0b1020 100%);
  border: 1px solid rgba(112, 144, 255, 0.28);
  box-shadow: 0 0 28px rgba(40, 60, 130, 0.18) inset;
  margin-bottom: 0.5rem;
}

.control-panel-grid {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.compass-rose {
  width: 92px;
  height: 92px;
  flex-shrink: 0;
}

.control-readouts {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
  min-width: 0;
}

.readout {
  background: rgba(13, 13, 30, 0.6);
  border: 1px solid var(--border-thin);
  border-radius: 10px;
  padding: 0.5rem 0.8rem;
}

.readout-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.readout-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

/* --- manual: display toggles as switches (no markup change) --- */
.display-controls .toggle-item {
  justify-content: flex-start;
  gap: 0.7rem;
  padding: 0.35rem 0.7rem;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-thin);
  border-radius: 10px;
}

.display-controls .toggle-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 46px;
  height: 26px;
  border-radius: var(--radius-pill);
  background: #33384d;
  position: relative;
  cursor: pointer;
  transition: background 0.15s;
}

.display-controls .toggle-item input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
}

.display-controls .toggle-item input[type="checkbox"]:checked { background: var(--accent); }
.display-controls .toggle-item input[type="checkbox"]:checked::before { transform: translateX(20px); }

.display-controls .toggle-item input[type="checkbox"]:focus-visible {
  outline: 3px solid var(--warn);
  outline-offset: 3px;
}

/* --- viewer: two-line violet sample badge (overrides earlier amber rule) --- */
.viewer-sample-badge {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: right;
  padding: 5px 11px;
  border-radius: 12px;
  background: rgba(86, 66, 138, 0.55);
  border: 1px solid rgba(150, 120, 210, 0.5);
  color: #d8c8ff;
  white-space: nowrap;
  flex-shrink: 0;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.viewer-sample-badge-main { font-size: 0.72rem; font-weight: 700; }
.viewer-sample-badge-sub { font-size: 0.6rem; color: #c2b2ea; }

/* --- responsive: wider screens get multi-column grids --- */
@media (min-width: 560px) {
  .route-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(4, 1fr); }
}

/* --- mobile (<=480px): stack cleanly, hide desktop nav, no overflow --- */
@media (max-width: 480px) {
  .site-nav { display: none; }
  .site-header { padding-bottom: 0.5rem; }
  .control-panel-grid { gap: 0.7rem; }
  .compass-rose { width: 76px; height: 76px; }
  .readout-value { font-size: 1.2rem; }
}

/* ============================================================
   MVP 1-J: viewer manual/sensor mode toggle
   ============================================================ */

.viewer-mode-row {
  display: flex;
  align-items: center;
  gap: 10px 14px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.viewer-mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  cursor: pointer;
  user-select: none;
}

.viewer-mode-toggle input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: #33384d;
  position: relative;
  cursor: pointer;
  transition: background 0.15s;
}

.viewer-mode-toggle input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
}

.viewer-mode-toggle input[type="checkbox"]:checked { background: var(--accent); }
.viewer-mode-toggle input[type="checkbox"]:checked::before { transform: translateX(20px); }

.viewer-mode-toggle input[type="checkbox"]:focus-visible {
  outline: 3px solid var(--warn);
  outline-offset: 3px;
}

.viewer-mode-toggle-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(200, 212, 240, 0.95);
}

.viewer-mode-hint {
  font-size: 0.74rem;
  color: rgba(170, 185, 220, 0.8);
}

/* sensor explanation, shown only when the toggle is ON */
.viewer-sensor-note {
  background: rgba(10, 14, 30, 0.72);
  border: 1px solid var(--hud-line);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  margin-bottom: 10px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.viewer-sensor-note p {
  font-size: 0.76rem;
  line-height: 1.6;
  color: rgba(190, 200, 228, 0.92);
  margin: 0 0 0.55rem;
}

.viewer-sensor-proceed {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(112, 144, 255, 0.55);
  background: rgba(112, 144, 255, 0.12);
  color: #cfe0ff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.viewer-sensor-proceed:hover { background: rgba(112, 144, 255, 0.2); }

.viewer-sensor-proceed:focus-visible {
  outline: 3px solid var(--warn);
  outline-offset: 3px;
}

/* MVP 2-C: opt-in sensor-follow controls inside the sensor note */
.viewer-sensor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0.55rem;
}

.viewer-sensor-proceed--ghost {
  border-color: var(--hud-line);
  background: transparent;
  color: rgba(200, 212, 240, 0.95);
}

.viewer-sensor-proceed--ghost:hover { background: rgba(255, 255, 255, 0.06); }

.viewer-sensor-follow-status {
  margin: 0.5rem 0 0;
  font-size: 0.76rem;
  line-height: 1.6;
  color: rgba(190, 200, 228, 0.92);
}

/* MVP 2-E: status sits outside the disclosure so denied/no-events/stopped stay
   visible while collapsed; empty status collapses away to keep the panel compact. */
.viewer-sensor-follow-status:empty { display: none; }

/* MVP 2-D/2-E: compact follow panel — resting row keeps chip + primary follow
   button + 詳細 toggle visible; the secondary tools collapse into the disclosure. */
.viewer-sensor-note-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
}

/* MVP 2-E: the follow button grows to fill the resting row; chip + toggle stay compact. */
.viewer-sensor-note-head .viewer-follow-chip { flex: 0 0 auto; }
.viewer-sensor-note-head .viewer-sensor-proceed {
  flex: 1 1 150px;
  justify-content: center;
}
.viewer-sensor-note-head .viewer-sensor-explain-toggle { flex: 0 0 auto; }

.viewer-follow-chip {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background: rgba(10, 12, 30, 0.5);
  border: 1px solid var(--hud-line);
  color: rgba(190, 205, 255, 0.95);
  white-space: nowrap;
}

.viewer-sensor-explain-toggle {
  min-height: 36px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-thin);
  background: transparent;
  color: rgba(200, 212, 240, 0.9);
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.viewer-sensor-explain-toggle:hover { background: rgba(255, 255, 255, 0.06); }

.viewer-sensor-explain-toggle:focus-visible {
  outline: 3px solid var(--warn);
  outline-offset: 3px;
}

/* MVP 2-E: secondary tools + explanation/caution live here, collapsed by default.
   A tighter cap keeps the expanded panel from swallowing the canvas at 375px. */
.viewer-sensor-explain {
  margin-top: 0.6rem;
  max-height: min(28vh, 220px);
  overflow-y: auto;
}

.viewer-sensor-explain[hidden] { display: none; }

.viewer-sensor-caution {
  color: rgba(255, 206, 138, 0.92);
}

/* ============================================================
   MVP 1-K: viewer-first guidance & onboarding polish
   ============================================================ */

/* --- viewer: collapsible help / privacy panel (top overlay) --- */
.viewer-help {
  margin-top: 8px;
  max-width: 100%;
}

.viewer-help-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(150, 120, 210, 0.5);
  background: rgba(86, 66, 138, 0.5);
  color: #e2d8ff;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  list-style: none;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* hide the native disclosure triangle */
.viewer-help-summary::-webkit-details-marker { display: none; }
.viewer-help > summary::marker { content: ""; }

.viewer-help-summary-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(216, 200, 255, 0.18);
  font-weight: 700;
}

.viewer-help[open] > .viewer-help-summary {
  background: rgba(112, 90, 170, 0.6);
}

.viewer-help-summary:focus-visible {
  outline: 3px solid var(--warn);
  outline-offset: 3px;
}

.viewer-help-panel {
  margin-top: 8px;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  background: rgba(10, 14, 30, 0.82);
  border: 1px solid var(--hud-line);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  max-height: 52vh;
  overflow-y: auto;
}

.viewer-help-lead {
  margin: 0 0 0.5rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: rgba(200, 212, 240, 0.95);
}

.viewer-help-list {
  margin: 0;
  padding-left: 1.1rem;
  list-style: disc;
}

.viewer-help-list li {
  font-size: 0.76rem;
  line-height: 1.6;
  color: rgba(190, 200, 228, 0.92);
  margin-bottom: 0.35rem;
}

.viewer-help-list li:last-child {
  margin-bottom: 0;
}

/* --- viewer: subtle divider separating mode selection from display controls --- */
.viewer-mode-row {
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-thin);
}

/* --- manual.html: legacy / superseded-by-viewer note --- */
.manual-legacy-note {
  margin: 0 0 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--tone-viewer);
  background: var(--surface);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.manual-legacy-note strong { color: var(--text); }

.manual-legacy-note a {
  color: var(--tone-viewer);
  font-weight: 600;
}

/* --- mobile (<=480px): keep help panel readable without overflow --- */
@media (max-width: 480px) {
  .viewer-help-summary { font-size: 0.74rem; }
  .viewer-help-panel { max-height: 46vh; }
}

/* ============================================================
   MVP 1-L: public trust / guide pages
   Static info pages (guide / privacy / safety / about) + shared
   footer/help links. Additive only; reuses existing tokens. No JS.
   ============================================================ */

/* info pages use the normal scroll layout; tune column rhythm */
.info-page main {
  padding-top: 1rem;
  padding-bottom: 1.5rem;
}

/* hero block at the top of each info page */
.info-hero {
  position: relative;
  border: 1px solid rgba(112, 144, 255, 0.22);
  border-radius: 14px;
  background: linear-gradient(135deg, #06070f 0%, #0b0f1e 100%);
  padding: 1.5rem 1.25rem;
  margin: 0.5rem 0 1.25rem;
}

.info-hero h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.03em;
  line-height: 1.25;
}

.info-hero-lead {
  font-size: 0.9rem;
  color: #c8d2f0;
  margin-top: 0.55rem;
  line-height: 1.6;
}

.info-hero .hero-sample-badge {
  margin-top: 0.75rem;
}

/* content card */
.info-card {
  background: linear-gradient(135deg, var(--panel-grad-a) 0%, var(--panel-grad-b) 100%);
  border: 1px solid var(--border-thin);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}

.info-card h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #c6d2f2;
  letter-spacing: 0.02em;
  margin-bottom: 0.55rem;
}

.info-card p {
  font-size: 0.86rem;
  color: #aab2cc;
  line-height: 1.65;
  margin-bottom: 0.5rem;
}

.info-card p:last-child {
  margin-bottom: 0;
}

.info-card a {
  color: var(--accent);
  text-decoration: none;
}

.info-card a:hover {
  text-decoration: underline;
}

.info-card a:focus-visible {
  outline: 3px solid var(--warn);
  outline-offset: 2px;
}

.info-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.3rem;
}

.info-card li {
  font-size: 0.86rem;
  color: #b6c0da;
  line-height: 1.6;
  padding-left: 1.3em;
  position: relative;
}

.info-card li::before {
  content: "•";
  position: absolute;
  left: 0.3em;
  color: var(--accent);
}

/* optional grid of compact points */
.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  margin-top: 0.3rem;
}

.info-grid-item {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-thin);
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
}

.info-grid-item h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.info-grid-item p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

/* pill link list — shared by info "関連ページ" cards and viewer help panel */
.info-link-list {
  list-style: none;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.45rem 0.55rem;
  margin: 0.3rem 0 0;
  padding: 0;
}

.info-link-list li {
  margin: 0;
  padding: 0;
}

.info-link-list li::before {
  content: none;
}

.info-link-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-thin);
  background: rgba(112, 144, 255, 0.06);
  color: rgba(190, 205, 255, 0.92);
  text-decoration: none;
  font-size: 0.8rem;
}

.info-link-list a:hover {
  border-color: rgba(112, 144, 255, 0.4);
  color: var(--accent);
}

.info-link-list a:focus-visible {
  outline: 3px solid var(--warn);
  outline-offset: 2px;
}

/* shared footer link row (index / sensor / manual / info pages) */
.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.4rem;
  margin: 0 0 0.75rem;
}

.site-footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.3rem 0.7rem;
  color: rgba(170, 185, 220, 0.85);
  text-decoration: none;
  font-size: 0.8rem;
  white-space: nowrap;
}

.site-footer-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.site-footer-links a:focus-visible {
  outline: 3px solid var(--warn);
  outline-offset: 2px;
}

/* viewer help panel: compact relative info links under the help list */
.viewer-help-links {
  margin-top: 0.6rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border-thin);
}

/* wider screens: info grid becomes two columns */
@media (min-width: 560px) {
  .info-grid { grid-template-columns: repeat(2, 1fr); }
}

/* mobile (<=480px): keep info hero/cards tidy, no horizontal scroll */
@media (max-width: 480px) {
  .info-hero { padding: 1.25rem 1rem; }
  .info-hero h1 { font-size: 1.4rem; }
  .info-card { padding: 1rem 1.05rem; }
}

/* ============================================================
   MVP 2-A: sensor → viewer heading handoff status
   Additive only; reuses existing tokens. Heading is shown as a
   目安 (estimate); display stays sample-only.
   ============================================================ */
.viewer-handoff {
  margin: 0.6rem 0 0.75rem;
  padding: 0.2rem 0 0.2rem 0.85rem;
  border-left: 3px solid var(--accent);
}

.viewer-handoff-status {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text);
}

.viewer-handoff-notes {
  margin: 0;
  padding-left: 1.1rem;
  list-style: disc;
}

.viewer-handoff-notes li {
  font-size: 0.76rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.viewer-handoff-notes li:last-child {
  margin-bottom: 0;
}

/* ============================================================
   MVP 2-F: minimal viewer controls — operation drawer
   The whole bottom operation panel collapses into #viewer-drawer;
   the resting viewer shows only the small #viewer-drawer-toggle
   handle. Portrait = bottom drawer (expands upward); landscape =
   right side drawer. Additive/structural CSS only; reuses existing
   tokens. No url(), no external refs; IDs / JS bindings unchanged.
   ============================================================ */

/* Bottom overlay becomes a flex stack: handle pinned at the bottom edge, drawer
   expands upward above it. Drop the always-on gradient so the resting state is
   only the small handle (handle + drawer carry their own backgrounds). */
.viewer-overlay--bottom {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 8px;
  background: none;
}

/* Small, arrow-centric handle. The action text ("操作を開く" / "操作を閉じる")
   lives in aria-label (set by app.js), so the visible chrome stays minimal while
   the control is still announced. 44px tap target. */
.viewer-drawer-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  align-self: center;
  min-width: 44px;
  min-height: 44px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hud-line);
  background: var(--hud-bg);
  color: rgba(200, 212, 240, 0.95);
  cursor: pointer;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.viewer-drawer-toggle:hover { background: rgba(18, 22, 34, 0.78); }

.viewer-drawer-toggle:focus-visible {
  outline: 3px solid var(--warn);
  outline-offset: 3px;
}

.viewer-drawer-toggle-arrow {
  display: inline-block;
  font-size: 0.9rem;
  line-height: 1;
  color: rgba(190, 205, 255, 0.95);
  transition: transform 0.15s ease;
}

/* Closed arrow points up (drawer opens upward); flips when open. */
.viewer-drawer-toggle[aria-expanded="true"] .viewer-drawer-toggle-arrow {
  transform: rotate(180deg);
}

/* Minimal status dot: surfaces important follow states (denied / no-events /
   active …) on the collapsed handle without occupying much room. */
.viewer-drawer-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

.viewer-drawer-status-dot[hidden] { display: none; }
.viewer-drawer-status-dot--active { background: var(--accent); }
.viewer-drawer-status-dot--alert { background: var(--warn); }

/* The drawer holds the full operation panel. Capped height keeps it from filling
   the screen / crushing the canvas; own panel background for readability. */
.viewer-drawer {
  width: 100%;
  max-height: min(62vh, 460px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--hud-line);
  background: rgba(8, 10, 22, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.viewer-drawer[hidden] { display: none; }

/* Landscape: a right side drawer instead of a bottom panel, so the canvas keeps
   the left of the screen. Handle rides the right edge; drawer opens to its left
   and is width-capped so it never fills the screen. */
@media (orientation: landscape) {
  .viewer-overlay--bottom {
    top: 0;
    bottom: 0;
    left: auto;
    right: 0;
    width: auto;
    flex-direction: row-reverse;
    align-items: center;
    gap: 8px;
    padding-top: 8px;
    padding-bottom: 8px;
    padding-right: max(16px, env(safe-area-inset-right, 16px));
  }

  .viewer-drawer {
    width: min(64vw, 300px);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }

  /* Arrow points toward where the drawer opens (left), flips when open. */
  .viewer-drawer-toggle-arrow { transform: rotate(-90deg); }
  .viewer-drawer-toggle[aria-expanded="true"] .viewer-drawer-toggle-arrow {
    transform: rotate(90deg);
  }
}

/* ============================================================
   MVP 4-A: public experience & family-friendly polish
   Additive only; reuses existing tokens. No external assets and
   no url() (icons are inline <img>). 375px-safe; >=44px tap targets.
   ============================================================ */

/* index: primary / secondary CTA stack under the hero */
.index-cta-row {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0 0 1.25rem;
}

/* primary CTA — prominent gradient button with icon + arrow */
.cta-primary {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  padding: 0.9rem 1.1rem;
  min-height: 64px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2b3a7a 0%, #3550b0 55%, #4a6cff 100%);
  border: 1px solid rgba(150, 175, 255, 0.55);
  box-shadow: 0 6px 22px rgba(40, 60, 150, 0.35);
  color: #fff;
  transition: transform 0.1s, box-shadow 0.15s, border-color 0.15s;
}

.cta-primary:hover {
  border-color: rgba(180, 200, 255, 0.8);
  box-shadow: 0 8px 26px rgba(60, 80, 180, 0.45);
}

.cta-primary:focus-visible { outline: 3px solid var(--warn); outline-offset: 3px; }
.cta-primary:active { transform: translateY(1px); }

.cta-primary-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(8, 12, 30, 0.4);
  border: 1px solid rgba(180, 200, 255, 0.45);
}

.cta-primary-icon img { width: 28px; height: 28px; }

.cta-primary-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cta-primary-title { font-size: 1.1rem; font-weight: 700; letter-spacing: 0.02em; }
.cta-primary-sub { font-size: 0.78rem; color: rgba(220, 228, 255, 0.85); margin-top: 0.1rem; }
.cta-primary-arrow { font-size: 1.2rem; flex-shrink: 0; color: rgba(220, 230, 255, 0.9); }

/* secondary CTA — ghost block button with title + sub (manual/teal tone) */
.cta-secondary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-decoration: none;
  padding: 0.7rem 1.1rem;
  min-height: 56px;
  border-radius: 12px;
  border: 1px solid rgba(94, 201, 160, 0.45);
  background: rgba(94, 201, 160, 0.06);
  color: #cdeae0;
  transition: background 0.15s, border-color 0.15s;
}

.cta-secondary:hover { background: rgba(94, 201, 160, 0.12); border-color: rgba(94, 201, 160, 0.7); }
.cta-secondary:focus-visible { outline: 3px solid var(--warn); outline-offset: 3px; }
.cta-secondary-title { font-size: 1rem; font-weight: 700; color: #d6f2e8; }
.cta-secondary-title::after { content: " \2192"; color: rgba(160, 220, 200, 0.8); }
.cta-secondary-sub { font-size: 0.76rem; color: rgba(150, 200, 185, 0.85); margin-top: 0.1rem; }

/* index: real-star-preview explainer card (viewer/violet tone) */
.preview-explainer {
  background: linear-gradient(135deg, var(--panel-grad-a) 0%, var(--panel-grad-b) 100%);
  border: 1px solid rgba(184, 156, 255, 0.28);
  border-left: 3px solid var(--tone-viewer);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  margin-bottom: 1.25rem;
}

.preview-explainer-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1.02rem;
  font-weight: 700;
  color: #d8c8ff;
  margin-bottom: 0.5rem;
}

.preview-explainer-icon { width: 22px; height: 22px; flex-shrink: 0; }

.preview-explainer p { font-size: 0.85rem; color: #b3bcd8; line-height: 1.65; margin-bottom: 0.5rem; }
.preview-explainer p:last-child { margin-bottom: 0; }
.preview-explainer strong { color: #e6d8ff; }

.preview-explainer-points {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0.2rem 0 0.6rem;
}

.preview-explainer-points li { font-size: 0.82rem; color: #aab2cc; line-height: 1.6; margin-bottom: 0.25rem; }
.preview-explainer-points li:last-child { margin-bottom: 0; }
.preview-explainer-links { font-size: 0.82rem; color: #aab2cc; line-height: 1.6; }
.preview-explainer a { color: var(--accent); text-decoration: none; }
.preview-explainer a:hover { text-decoration: underline; }
.preview-explainer a:focus-visible { outline: 3px solid var(--warn); outline-offset: 2px; }

/* index: 3-up route grid on wider screens (stacks to 1 column on mobile) */
@media (min-width: 560px) {
  .route-grid--three { grid-template-columns: repeat(3, 1fr); }
}

/* manual: "when useful" list (global reset removes default list indent) */
.manual-usecases ul {
  list-style: disc;
  padding-left: 1.3rem;
  margin-top: 0.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.manual-usecases li { font-size: 0.86rem; color: #b6c0da; line-height: 1.6; }

/* manual: honest note under the viewer launch button */
.viewer-launch-note {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.45rem;
  line-height: 1.5;
}

/* ============================================================
   MVP 15-D: standalone observation session page
   ============================================================ */
.session-page main { width: min(100%, 960px); }
.session-hero,
.session-card,
.session-link-card {
  display: grid;
  gap: 0.8rem;
  min-width: 0;
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid rgba(150, 176, 255, 0.24);
  border-left: 3px solid var(--tone-viewer);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--panel-grad-a) 0%, var(--panel-grad-b) 100%);
}
.session-kicker,
.session-title,
.session-summary,
.session-card h2,
.session-note,
.session-checklist-summary,
.session-link-card p,
.session-flow-step,
.session-checklist-item {
  max-width: 100%;
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}
.session-kicker { color: var(--accent); font-size: 0.78rem; font-weight: 700; }
.session-title { color: var(--text); font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2rem); line-height: 1.25; }
.session-summary,
.session-list,
.session-checklist-summary,
.session-link-card p { color: #b3bcd8; font-size: 0.88rem; line-height: 1.68; }
.session-actions,
.session-final-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; min-width: 0; }
.session-action,
.session-link-card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  padding: 0.6rem 0.9rem;
  border: 1px solid rgba(112, 144, 255, 0.36);
  border-radius: 8px;
  background: rgba(112, 144, 255, 0.08);
  color: rgba(214, 226, 255, 0.96);
  text-align: center;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
}
.session-action--primary,
.session-link-card-action { border-color: rgba(255, 179, 71, 0.54); background: rgba(255, 179, 71, 0.1); color: #ffe3ae; }
.session-flow-list,
.session-list,
.session-checklist-form { display: grid; gap: 0.55rem; min-width: 0; margin: 0; padding: 0; }
.session-flow-list,
.session-list { list-style: none; }
.session-list--ordered { list-style: decimal; padding-left: 1.2rem; }
.session-flow-step,
.session-checklist-item { border: 1px solid rgba(112, 144, 255, 0.2); border-radius: 8px; background: rgba(255, 255, 255, 0.025); }
.session-flow-step { display: flex; gap: 0.65rem; align-items: flex-start; padding: 0.75rem 0.8rem; }
.session-flow-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 1.6rem;
  width: 1.6rem;
  height: 1.6rem;
  border: 1px solid rgba(184, 156, 255, 0.45);
  border-radius: 50%;
  background: rgba(184, 156, 255, 0.12);
  color: #e6d8ff;
  font-size: 0.78rem;
  font-weight: 700;
}
.session-flow-step-body { display: grid; gap: 0.2rem; min-width: 0; }
.session-flow-step-body strong { color: #e4ebff; font-size: 0.88rem; line-height: 1.45; }
.session-flow-step-body span,
.session-list li { color: #aab2cc; font-size: 0.84rem; line-height: 1.58; }
.session-checklist-item { display: flex; align-items: center; gap: 0.65rem; min-height: 44px; padding: 0.65rem 0.75rem; color: #e4ebff; cursor: pointer; user-select: none; }
.session-checklist-item input { flex: 0 0 auto; width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.session-note { padding: 0.6rem 0.7rem; border-left: 2px solid rgba(255, 179, 71, 0.42); border-radius: 0 6px 6px 0; background: rgba(255, 179, 71, 0.06); color: #c8c1aa; font-size: 0.84rem; line-height: 1.6; }
.session-note--footer { margin: 0 0 1.25rem; }
.viewer-session-page-link-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0 0 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 179, 71, 0.36);
  border-radius: 8px;
  background: rgba(255, 179, 71, 0.07);
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}
.viewer-session-page-link-title,
.viewer-session-page-link-copy { max-width: 100%; min-width: 0; margin: 0; overflow-wrap: anywhere; }
.viewer-session-page-link-title { color: #ffe3ae; font-size: 0.78rem; font-weight: 800; line-height: 1.35; }
.viewer-session-page-link-copy { color: rgba(218, 228, 255, 0.9); font-size: 0.72rem; line-height: 1.45; }
.viewer-session-page-link {
  justify-self: start;
  max-width: 100%;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 179, 71, 0.48);
  border-radius: 8px;
  background: rgba(255, 179, 71, 0.1);
  color: #ffe3ae;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.session-action:hover,
.session-link-card-action:hover,
.viewer-session-page-link:hover { border-color: rgba(255, 179, 71, 0.72); color: #fff0c7; }
.viewer-session-page-link-card:focus,
.viewer-session-page-link:focus-visible,
.session-action:focus-visible,
.session-link-card-action:focus-visible,
.session-checklist-item input:focus-visible { outline: 3px solid rgba(255, 179, 71, 0.68); outline-offset: 2px; }
.viewer-session-page-link-card--launch-highlight { border-color: rgba(255, 179, 71, 0.78); background-color: rgba(255, 179, 71, 0.11); box-shadow: inset 0 0 0 1px rgba(255, 179, 71, 0.28), 0 0 0 2px rgba(255, 179, 71, 0.16); }
@media (prefers-reduced-motion: reduce) { .viewer-session-page-link-card { transition: none; } }
@media (min-width: 640px) { .session-flow-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } .session-flow-step:last-child { grid-column: 1 / -1; } .session-action { flex: 1 1 0; } }
@media (max-width: 420px) { .session-hero, .session-card, .session-link-card { padding: 0.9rem; } .session-actions, .session-final-actions { flex-direction: column; } .viewer-session-page-link { justify-self: stretch; } }
/* ============================================================
   MVP 16-A: public release readiness polish
   ============================================================ */
.route-card--recommended {
  border-color: rgba(255, 179, 71, 0.44);
  background: linear-gradient(135deg, rgba(255, 179, 71, 0.1) 0%, var(--panel-grad-b) 100%);
}

.route-card--recommended .route-card-sub,
.route-card--recommended .route-card-cta {
  color: #ffe3ae;
}

.index-choice-note a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.index-choice-note a:hover {
  text-decoration: underline;
}

.index-choice-note a:focus-visible {
  outline: 3px solid var(--warn);
  outline-offset: 2px;
}

@media (min-width: 720px) {
  .site-nav {
    justify-content: flex-end;
  }
}
/* ============================================================
   MVP 16-B: graphical observation experience foundation
   ============================================================ */
:root {
  --experience-bg: #050914;
  --experience-panel: rgba(13, 20, 39, 0.84);
  --experience-panel-strong: rgba(18, 27, 52, 0.92);
  --experience-line: rgba(154, 177, 238, 0.24);
  --experience-muted: #aebce2;
  --experience-soft: #d7e3ff;
  --experience-warm: #ffca7a;
  --experience-cool: #80b8ff;
  --experience-teal: #72d6c2;
  --experience-radius: 14px;
  --experience-shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
  --experience-inner-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

body:not(.viewer-body) {
  color: #edf3ff;
  overflow-x: clip;
  background: linear-gradient(180deg, rgba(5, 9, 20, 0.94) 0%, rgba(3, 7, 18, 0.98) 58%, #02040c 100%), var(--experience-bg);
}

@supports not (overflow-x: clip) {
  body:not(.viewer-body) { overflow-x: hidden; }
}

body:not(.viewer-body)::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.66;
  background-image: radial-gradient(circle, rgba(232, 240, 255, 0.72) 0 1px, transparent 1.4px), radial-gradient(circle, rgba(143, 190, 255, 0.44) 0 1px, transparent 1.6px), linear-gradient(160deg, rgba(42, 82, 145, 0.24), transparent 42%), linear-gradient(25deg, rgba(255, 202, 122, 0.1), transparent 38%);
  background-position: 18px 22px, 90px 68px, 0 0, 0 0;
  background-size: 156px 156px, 238px 238px, 100% 100%, 100% 100%;
}

body:not(.viewer-body) main,
body:not(.viewer-body) footer { position: relative; z-index: 1; }
body:not(.viewer-body) main { width: min(100%, 980px); max-width: 980px; }
.info-page main,
.session-page main { width: min(100%, 920px); max-width: 920px; }

.site-header {
  align-items: center;
  margin: 0.35rem 0 1rem;
  padding: 0.7rem;
  border: 1px solid rgba(154, 177, 238, 0.16);
  border-radius: var(--experience-radius);
  background: rgba(7, 12, 27, 0.66);
  box-shadow: var(--experience-inner-shadow);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.brand-mark { filter: drop-shadow(0 0 10px rgba(128, 184, 255, 0.55)); }
.brand-name { color: #f4f7ff; }
.brand-sub,
.site-nav a { color: rgba(215, 227, 255, 0.72); }
.site-nav a { border: 1px solid transparent; border-radius: var(--radius-pill); padding: 0.35rem 0.62rem; }
.site-nav a:hover { border-color: rgba(128, 184, 255, 0.32); background: rgba(128, 184, 255, 0.08); color: #fff; text-decoration: none; }

.index-hero,
.info-hero,
.session-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-color: var(--experience-line);
  border-radius: var(--experience-radius);
  background: linear-gradient(145deg, rgba(15, 25, 52, 0.96), rgba(5, 10, 24, 0.96) 56%, rgba(5, 13, 29, 0.98));
  box-shadow: var(--experience-shadow), var(--experience-inner-shadow);
}
.index-hero::before,
.info-hero::before,
.session-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.62;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.78) 0 1px, transparent 1.5px), radial-gradient(circle, rgba(128, 184, 255, 0.42) 0 1px, transparent 1.6px), linear-gradient(120deg, rgba(128, 184, 255, 0.18), transparent 46%);
  background-position: 16px 24px, 86px 54px, 0 0;
  background-size: 128px 128px, 196px 196px, 100% 100%;
}
.index-hero { min-height: clamp(300px, 46vw, 470px); align-items: end; }
.index-hero-bg { opacity: 0.52; mix-blend-mode: screen; }
.index-hero-content { padding: clamp(2.7rem, 7vw, 5.4rem) clamp(1.15rem, 4vw, 2.5rem) clamp(1.35rem, 4vw, 2.25rem); background: linear-gradient(to top, rgba(2, 5, 15, 0.94), rgba(4, 8, 21, 0.72) 48%, rgba(4, 8, 21, 0.16)); }
.index-hero-title,
.info-hero h1,
.session-title { color: #f2f6ff; letter-spacing: 0; text-shadow: 0 0 24px rgba(128, 184, 255, 0.22); }
.index-hero-title { max-width: 13em; font-size: clamp(2rem, 6vw, 4.1rem); font-weight: 760; line-height: 1.08; }
.index-hero-tagline,
.info-hero-lead,
.session-summary { color: var(--experience-soft); }
.index-hero-tagline { max-width: 42rem; font-size: clamp(1rem, 2vw, 1.22rem); }
.index-hero-blurb { max-width: 48rem; color: rgba(215, 227, 255, 0.82); font-size: 0.9rem; }
.hero-sample-badge { border-color: rgba(114, 214, 194, 0.3); background: rgba(8, 40, 49, 0.48); color: #c8fff2; box-shadow: var(--experience-inner-shadow); }

.index-choices,
.observation-entry,
.preview-explainer,
.features,
.safety-notice--panel,
.page-intro,
.sample-notice,
.sensor-section,
.session-link-card,
.fallback-card,
.manual-notice,
.privacy-card,
.info-card,
.session-card {
  border-color: var(--experience-line);
  background: linear-gradient(145deg, rgba(15, 25, 49, 0.86), rgba(8, 14, 32, 0.9)), var(--experience-panel);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24), var(--experience-inner-shadow);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.index-choices-title,
.features-title,
.observation-entry-title,
.preview-explainer-title,
.page-intro h2,
.sensor-section h2,
.fallback-card h2,
.privacy-card-body h2,
.info-card h2,
.session-card h2 { color: #f1f5ff; letter-spacing: 0; }

.route-card {
  position: relative;
  overflow: hidden;
  min-height: 168px;
  border-color: rgba(154, 177, 238, 0.2);
  border-radius: var(--experience-radius);
  background: linear-gradient(150deg, rgba(20, 32, 62, 0.92), rgba(9, 15, 34, 0.96)), var(--experience-panel);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28), var(--experience-inner-shadow);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.route-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--rc), transparent 80%); opacity: 0.78; }
.route-card:hover { transform: translateY(-2px); border-color: var(--rc); background: linear-gradient(150deg, rgba(26, 42, 78, 0.96), rgba(9, 15, 34, 0.98)), var(--experience-panel-strong); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(255, 255, 255, 0.035); }
.route-card-icon { border-radius: 12px; background: rgba(6, 12, 29, 0.72); box-shadow: inset 0 0 18px rgba(128, 184, 255, 0.08); }
.route-card-name { color: #f7f9ff; }
.route-card-desc,
.index-choice-note,
.observation-entry-summary,
.observation-entry-step-body span,
.feature-desc,
.preview-explainer p,
.preview-explainer-points li,
.session-list li,
.session-flow-step-body span,
.session-checklist-summary,
.session-link-card p,
.info-card p,
.info-card li,
.permission-note,
.note-placeholder,
.privacy-card-body p { color: var(--experience-muted); }
.route-card--recommended { min-height: 188px; border-color: rgba(255, 202, 122, 0.52); background: linear-gradient(150deg, rgba(68, 45, 19, 0.55), rgba(17, 25, 49, 0.95) 48%, rgba(9, 15, 34, 0.98)), var(--experience-panel-strong); box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(255, 202, 122, 0.08); }
.route-card--recommended .route-card-icon { border-color: rgba(255, 202, 122, 0.58); box-shadow: inset 0 0 20px rgba(255, 202, 122, 0.12), 0 0 22px rgba(255, 202, 122, 0.12); }
.route-card-cta,
.index-choice-note a,
.preview-explainer a,
.info-card a { color: #9cc8ff; }
.route-card--recommended .route-card-cta,
.session-action--primary,
.session-link-card-action { color: #fff1c9; }

.observation-entry-steps,
.session-flow-list,
.session-checklist-form,
.feature-grid { gap: 0.78rem; }
.observation-entry-step,
.feature-card,
.session-flow-step,
.session-checklist-item,
.status-card,
.detail-card,
.viewer-handoff { border-color: rgba(154, 177, 238, 0.22); background: rgba(255, 255, 255, 0.035); box-shadow: var(--experience-inner-shadow); }
.observation-entry-step-number,
.session-flow-step-number,
.status-card-num { background: linear-gradient(135deg, rgba(128, 184, 255, 0.28), rgba(255, 202, 122, 0.2)); color: #f7fbff; border: 1px solid rgba(197, 214, 255, 0.28); }

.session-page main { padding-bottom: 2rem; }
.session-hero { padding: clamp(1.35rem, 4vw, 2.25rem); }
.session-kicker { color: var(--experience-warm); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; }
.session-card { position: relative; overflow: hidden; }
.session-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: linear-gradient(90deg, rgba(128, 184, 255, 0.45), transparent 72%); }
.session-action,
.session-link-card-action,
.fallback-link,
.viewer-entry-btn,
.nav-btn-secondary,
.nav-link-block,
.button { min-height: 44px; border-radius: 12px; transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease; }
.session-action:hover,
.session-link-card-action:hover,
.fallback-link:hover,
.viewer-entry-btn:hover,
.nav-btn-secondary:hover,
.nav-link-block:hover,
.button:hover { transform: translateY(-1px); }
.session-checklist-item { min-height: 52px; border-radius: 12px; }
.session-checklist-item input { accent-color: var(--experience-warm); }

.page-intro { border-radius: var(--experience-radius); padding: clamp(1rem, 3vw, 1.45rem); }
.sky-hero-section { border-color: rgba(128, 184, 255, 0.28); }
.control-panel,
.display-controls-section,
.viewer-entry-section { border-color: rgba(128, 184, 255, 0.24); }
.notice-bar { border-color: rgba(255, 202, 122, 0.32); background: rgba(58, 42, 13, 0.34); }
.notice-accuracy { color: #ffe0a6; }
.fallback-card,
.privacy-card,
.safety-notice--panel { border-color: rgba(114, 214, 194, 0.24); background: linear-gradient(145deg, rgba(9, 37, 43, 0.56), rgba(9, 15, 34, 0.94)), var(--experience-panel); }

.info-hero { padding: clamp(1.4rem, 4vw, 2.25rem); }
.info-card { border-radius: var(--experience-radius); }
.info-card .info-link-list { gap: 0.55rem; }
.info-card .info-link-list li { padding-left: 0; }
.info-card .info-link-list li::before { content: none; }
.info-card .info-link-list a { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0.65rem 0.8rem; border: 1px solid rgba(128, 184, 255, 0.22); border-radius: 12px; background: rgba(255, 255, 255, 0.035); text-decoration: none; }
.info-card .info-link-list a::after { content: "->"; color: rgba(255, 202, 122, 0.82); }

.viewer-drawer { border-color: rgba(154, 177, 238, 0.24); border-radius: 18px 18px 0 0; background: linear-gradient(160deg, rgba(14, 24, 48, 0.9), rgba(5, 9, 21, 0.94)), rgba(8, 14, 29, 0.92); box-shadow: 0 -16px 46px rgba(0, 0, 0, 0.42), var(--experience-inner-shadow); }
.viewer-mode-row,
.viewer-session-page-link-card,
.viewer-control-page,
.viewer-additional-overlay,
.viewer-sensor-note,
.viewer-safety-note { border-color: rgba(154, 177, 238, 0.22); background: rgba(255, 255, 255, 0.035); box-shadow: var(--experience-inner-shadow); }
.viewer-session-page-link-card { border-left: 3px solid rgba(255, 202, 122, 0.72); }
.viewer-session-page-link-title { color: #ffe7b5; }
.viewer-session-page-link { border-radius: 10px; background: rgba(255, 202, 122, 0.1); }
.viewer-control-tab { border-color: rgba(154, 177, 238, 0.2); border-radius: 12px; background: rgba(255, 255, 255, 0.035); }
.viewer-control-tab[aria-selected="true"],
.viewer-control-tab--active { border-color: rgba(128, 184, 255, 0.72); background: linear-gradient(135deg, rgba(128, 184, 255, 0.24), rgba(255, 202, 122, 0.08)); box-shadow: inset 0 0 0 1px rgba(221, 232, 255, 0.12), 0 0 18px rgba(128, 184, 255, 0.1); }
.viewer-control-page .viewer-toggle-item--pill,
.viewer-star-mode-option span,
.viewer-btn-ghost,
.viewer-current-sky-input,
.viewer-current-sky-select { border-radius: 10px; }
.viewer-session-page-link-card--launch-highlight { border-color: rgba(255, 202, 122, 0.86); box-shadow: inset 0 0 0 1px rgba(255, 202, 122, 0.22), 0 0 0 2px rgba(255, 202, 122, 0.16), 0 0 28px rgba(255, 202, 122, 0.18); }

button:focus-visible,
a:focus-visible,
input[type="range"]:focus-visible,
input[type="checkbox"]:focus-visible,
select:focus-visible,
textarea:focus-visible { outline: 3px solid rgba(255, 202, 122, 0.88); outline-offset: 3px; }

@media (min-width: 720px) {
  .route-grid--three { grid-template-columns: 1.2fr 1fr 1fr; }
  .session-flow-list { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .session-flow-step:last-child { grid-column: auto; }
}
@media (max-width: 720px) {
  body:not(.viewer-body) main { padding-inline: 1rem; }
  .site-header { margin-top: 0.2rem; padding: 0.65rem; }
  .index-hero { min-height: 360px; }
}
@media (max-width: 420px) {
  body:not(.viewer-body) main { padding-inline: 0.85rem; }
  .index-hero,
  .info-hero,
  .session-hero,
  .route-card,
  .session-card,
  .info-card,
  .sensor-section,
  .page-intro { border-radius: 12px; }
  .route-card { min-height: 0; }
  .session-flow-list { grid-template-columns: 1fr; }
  .viewer-drawer { border-radius: 14px 14px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .route-card,
  .session-action,
  .session-link-card-action,
  .fallback-link,
  .viewer-entry-btn,
  .nav-btn-secondary,
  .nav-link-block,
  .button,
  .viewer-control-tab,
  .viewer-session-page-link-card { transition: none; }
  .route-card:hover,
  .session-action:hover,
  .session-link-card-action:hover,
  .fallback-link:hover,
  .viewer-entry-btn:hover,
  .nav-btn-secondary:hover,
  .nav-link-block:hover,
  .button:hover { transform: none; }
}

/* ============================================================
   MVP 16-C: session setup launcher
   ============================================================ */
.session-setup { display: grid; gap: 1rem; }
.session-setup-form { display: grid; gap: 0.9rem; min-width: 0; }
.session-setup-card { min-width: 0; margin: 0; padding: 0.9rem; border: 1px solid rgba(128, 184, 255, 0.22); border-radius: 10px; background: rgba(7, 13, 33, 0.42); }
.session-setup-card legend { padding: 0 0.25rem; color: #f4f7ff; font-size: 0.92rem; font-weight: 800; line-height: 1.4; }
.session-setup-choice-grid,
.session-setup-options,
.session-setup-dependent { display: grid; gap: 0.65rem; min-width: 0; }
.session-setup-choice { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.7rem; align-items: start; min-width: 0; padding: 0.75rem; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 10px; background: rgba(255, 255, 255, 0.035); color: #e9efff; cursor: pointer; }
.session-setup-choice input,
.session-setup-option input { flex: 0 0 auto; width: 1.1rem; height: 1.1rem; margin-top: 0.15rem; accent-color: var(--experience-warm, #ffca7a); }
.session-setup-choice-body { display: grid; gap: 0.18rem; min-width: 0; }
.session-setup-choice-title { color: #f7fbff; font-size: 0.92rem; font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.session-setup-choice-copy,
.session-setup-note { color: var(--experience-soft, #b9c4e3); font-size: 0.8rem; line-height: 1.58; overflow-wrap: anywhere; }
.session-setup-option { display: flex; align-items: flex-start; gap: 0.62rem; min-width: 0; min-height: 44px; padding: 0.62rem 0.7rem; border: 1px solid rgba(128, 184, 255, 0.18); border-radius: 10px; background: rgba(255, 255, 255, 0.03); color: #e9efff; font-size: 0.86rem; font-weight: 700; line-height: 1.45; cursor: pointer; }
.session-setup-option span { min-width: 0; overflow-wrap: anywhere; }
.session-setup-option:has(input:disabled) { opacity: 0.58; cursor: not-allowed; }
.session-setup-option input:disabled { cursor: not-allowed; }
.session-setup-option--wide { margin-top: 0.35rem; }
.session-setup-dependent { margin-top: 0.7rem; }
.session-setup-note { margin: 0.55rem 0 0; }
.session-setup-result { display: grid; gap: 0.55rem; min-width: 0; padding: 0.9rem; border: 1px solid rgba(255, 202, 122, 0.34); border-radius: 12px; background: rgba(255, 202, 122, 0.07); }
.session-setup-summary-label { margin: 0; color: #ffe7b5; font-size: 0.78rem; font-weight: 800; line-height: 1.35; }
.session-setup-summary { margin: 0; color: #f6f8ff; font-size: 0.94rem; font-weight: 800; line-height: 1.45; overflow-wrap: anywhere; }
.session-setup-launch { justify-self: stretch; text-align: center; }
.session-setup-choice:focus-within,
.session-setup-option:focus-within,
.session-setup-launch:focus-visible { outline: 3px solid rgba(255, 202, 122, 0.68); outline-offset: 2px; }
@media (min-width: 720px) {
  .session-setup-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .session-setup-options,
  .session-setup-dependent { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .session-setup-option--wide { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .session-setup-card,
  .session-setup-result { padding: 0.78rem; }
  .session-setup-choice,
  .session-setup-option { border-radius: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .session-setup-choice,
  .session-setup-option,
  .session-setup-launch { transition: none; }
}
/* ============================================================
   MVP 17-B: Moon/planet symbolic icons
   ============================================================ */
.celestial-symbol {
  display: inline-block;
  flex: 0 0 auto;
  width: 1.4rem;
  height: 1.4rem;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(128, 184, 255, 0.18));
}
.celestial-symbol--moon { width: 1.5rem; height: 1.5rem; }
.celestial-symbol--planet { width: 1.28rem; height: 1.28rem; }
.celestial-symbol-strip {
  display: inline-flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.22rem;
  min-width: 0;
  max-width: 100%;
}
.celestial-symbol-note {
  max-width: 100%;
  margin: 0;
  color: rgba(218, 228, 255, 0.82);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.session-setup-celestial {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.session-setup-celestial .celestial-symbol-strip {
  justify-self: start;
  max-width: 5.9rem;
}
.viewer-celestial-symbols {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem;
  min-width: 0;
  padding: 0.45rem 0.5rem;
  border: 1px solid rgba(128, 184, 255, 0.16);
  border-radius: 8px;
  background: rgba(128, 184, 255, 0.045);
}
.viewer-celestial-symbols .celestial-symbol-note {
  flex: 1 1 10rem;
}
.viewer-celestial-symbols--moon .celestial-symbol-note {
  flex-basis: 12rem;
}
@media (max-width: 420px) {
  .session-setup-celestial {
    grid-template-columns: 1fr;
    gap: 0.38rem;
  }
  .viewer-celestial-symbols .celestial-symbol-note {
    flex-basis: 100%;
  }
}
