/* 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;
}

.viewer-toggles {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.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;
}

.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;
}

/* === 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-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;
}

/* --- できること 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;
  font-size: 0.76rem;
  line-height: 1.6;
  color: rgba(190, 200, 228, 0.92);
}

.viewer-sensor-follow-status:empty { display: none; }

/* ============================================================
   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;
}
