:root {
  color-scheme: dark;
  --bg: #070b14;
  --ink: #f7fbff;
  --muted: #b9c7d8;
  --surface: rgba(13, 20, 34, 0.94);
  --surface-soft: rgba(21, 32, 52, 0.96);
  --line: rgba(140, 177, 216, 0.28);
  --accent: #48f0c7;
  --accent-dark: #13c6a2;
  --gold: #f8c45f;
  --rust: #ff9d7a;
  --blue: #8ab6ff;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(72, 240, 199, 0.16), transparent 30rem),
    radial-gradient(circle at 88% 0%, rgba(77, 130, 255, 0.14), transparent 34rem),
    linear-gradient(180deg, rgba(8, 14, 26, 0.98), var(--bg) 420px),
    var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 22px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}

.brand {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p,
dl,
dd {
  margin: 0;
}

h1 {
  font-size: clamp(34px, 5vw, 64px);
  line-height: 0.98;
  letter-spacing: 0;
}

.brand p:last-child {
  max-width: 720px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(92px, 1fr));
  gap: 8px;
}

.status-strip div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 10px 12px;
}

.status-strip dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.status-strip dd {
  margin-top: 2px;
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
}

.status-link {
  max-width: 180px;
  border-radius: 6px;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-size: 15px;
  font-weight: 850;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-link:hover,
.status-link:focus-visible {
  color: var(--accent-dark);
  outline: none;
  text-decoration: underline;
}

.status-link:disabled {
  cursor: default;
  color: var(--muted);
  text-decoration: none;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 330px);
  gap: 18px;
  align-items: start;
}

.viewer-surface,
.control-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.viewer-surface {
  overflow: hidden;
}

.viewer-toolbar {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}

h2 {
  font-size: 18px;
  line-height: 1.2;
}

.button-row {
  display: flex;
  gap: 8px;
}

.icon-button {
  width: 46px;
  min-width: 46px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  font-weight: 800;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.viewer {
  --scene-accent: var(--accent);
  --sky-top: #8cc7f7;
  --sky-bottom: #e7f7ff;
  --horizon: #7fb27e;
  --ground: #5f8f55;
  --ground-dark: #436f42;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 360px;
  max-height: calc(100vh - 170px);
  overflow: hidden;
  touch-action: none;
  background: linear-gradient(var(--sky-top), var(--sky-bottom) 56%, var(--ground) 56%);
  outline: none;
  user-select: none;
}

.hotspot-detail {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 3;
  display: grid;
  gap: 7px;
  width: min(340px, calc(100% - 32px));
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 16px 38px rgba(23, 33, 43, 0.2);
  padding: 14px;
  pointer-events: auto;
}

.hotspot-detail[hidden] {
  display: none;
}

.hotspot-kicker,
.hotspot-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.hotspot-detail h3 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.15;
}

.hotspot-detail p {
  line-height: 1.4;
}

.hotspot-note-field {
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.hotspot-note-field textarea {
  min-height: 74px;
  max-height: 150px;
  background: rgba(255, 255, 255, 0.88);
  font-size: 13px;
}

.hotspot-detail button {
  justify-self: start;
  min-height: 36px;
  border-radius: 8px;
  background: var(--scene-accent);
  color: #ffffff;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 800;
}

.hotspot-detail button:hover,
.hotspot-detail button:focus-visible {
  background: var(--accent-dark);
  outline: none;
}

.hotspot-detail button.is-flagged {
  background: var(--gold);
  color: #5a3d00;
}

.hotspot-detail button.is-flagged:hover,
.hotspot-detail button.is-flagged:focus-visible {
  background: #f0b429;
  color: #4a3200;
}

.hotspot-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.viewer:focus-visible {
  box-shadow: inset 0 0 0 3px var(--accent);
}

.viewer.is-dragging {
  cursor: grabbing;
}

.orientation-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
  padding: 12px 16px 14px;
}

.compass-readout {
  display: grid;
  gap: 2px;
  min-width: 82px;
}

.compass-readout span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.compass-readout strong {
  color: var(--accent);
  font-size: 24px;
  line-height: 1;
}

.compass-track {
  position: relative;
  height: 38px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 0 calc(50% - 1px), var(--accent) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    repeating-linear-gradient(90deg, rgba(23, 33, 43, 0.14) 0 1px, transparent 1px 12.5%),
    var(--surface);
}

.compass-track::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 7px;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 10px solid var(--accent);
  transform: translateX(-50%);
}

.compass-hotspot {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 6px 16px rgba(23, 33, 43, 0.24);
  transform: translate(-50%, -50%);
}

.compass-hotspot:hover,
.compass-hotspot:focus-visible,
.compass-hotspot.is-active {
  outline: none;
  background: var(--accent-dark);
  box-shadow: 0 0 0 5px rgba(15, 118, 110, 0.18), 0 6px 16px rgba(23, 33, 43, 0.24);
}

.panorama-world {
  position: absolute;
  top: 0;
  left: 0;
  width: 7200px;
  height: 100%;
  transform-origin: center bottom;
  will-change: transform;
}

.scene-band {
  position: absolute;
  top: 0;
  bottom: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 76% 18%, rgba(255, 255, 255, 0.75) 0 4%, transparent 6%),
    linear-gradient(var(--sky-top), var(--sky-bottom) 55%, var(--ground) 55%, var(--ground-dark));
}

.sun {
  position: absolute;
  top: 11%;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff9c7 0 34%, rgba(255, 249, 199, 0.42) 35% 70%, transparent 72%);
}

.horizon {
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: 38%;
  height: 22%;
  background:
    linear-gradient(135deg, transparent 0 38%, color-mix(in srgb, var(--horizon), #ffffff 20%) 39% 48%, transparent 49%),
    linear-gradient(45deg, transparent 0 42%, var(--horizon) 43% 52%, transparent 53%),
    linear-gradient(0deg, color-mix(in srgb, var(--horizon), #203322 20%), var(--horizon));
  clip-path: polygon(0 66%, 9% 43%, 17% 58%, 27% 28%, 39% 64%, 51% 38%, 63% 60%, 76% 30%, 88% 58%, 100% 42%, 100% 100%, 0 100%);
  opacity: 0.94;
}

.ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 45%;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(0, 0, 0, 0.18) 1px, transparent 1px),
    linear-gradient(180deg, var(--ground), var(--ground-dark));
  background-size: 120px 100%, 100% 42px, auto;
  transform: perspective(360px) rotateX(46deg);
  transform-origin: center top;
}

.world-object {
  position: absolute;
  bottom: 24%;
  transform: translateX(-50%) scale(var(--depth));
  transform-origin: center bottom;
}

.tree {
  width: 42px;
  height: 150px;
}

.tree::before,
.tree::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.tree::before {
  bottom: 0;
  width: 18px;
  height: 78px;
  border-radius: 8px;
  background: #614229;
}

.tree::after {
  bottom: 54px;
  width: 118px;
  height: 118px;
  border-radius: 45% 55% 48% 52%;
  background:
    radial-gradient(circle at 35% 36%, #4fa86a 0 20%, transparent 22%),
    radial-gradient(circle at 64% 42%, #2f8850 0 22%, transparent 24%),
    radial-gradient(circle at 50% 18%, #67b875 0 24%, transparent 26%),
    #3d9d5f;
}

.tree.large {
  transform: translateX(-50%) scale(1.12);
}

.marker {
  width: 48px;
  height: 72px;
  border-radius: 8px 8px 5px 5px;
  background: var(--gold);
  box-shadow: 0 18px 22px rgba(0, 0, 0, 0.18);
}

.marker::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -42px;
  width: 8px;
  height: 42px;
  transform: translateX(-50%);
  background: #3f3321;
}

.marker.blue {
  background: var(--blue);
}

.gate {
  width: 156px;
  height: 118px;
  border: 12px solid #6b4a2d;
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
}

.gate::before,
.gate::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 12px;
  height: 86px;
  background: #6b4a2d;
}

.gate::before {
  left: 44px;
}

.gate::after {
  right: 44px;
}

.bench {
  width: 168px;
  height: 92px;
}

.bench::before,
.bench::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 18px;
  border-radius: 7px;
  background: #8f5d34;
}

.bench::before {
  top: 18px;
}

.bench::after {
  top: 48px;
}

.crate {
  width: 112px;
  height: 86px;
  border: 8px solid #7e5130;
  border-radius: 8px;
  background:
    linear-gradient(45deg, transparent 46%, #7e5130 47% 53%, transparent 54%),
    linear-gradient(-45deg, transparent 46%, #7e5130 47% 53%, transparent 54%),
    #bf8754;
}

.lamp {
  width: 72px;
  height: 154px;
}

.lamp::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 10px;
  height: 106px;
  transform: translateX(-50%);
  background: #333b44;
}

.lamp::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 72px;
  height: 54px;
  border-radius: 50% 50% 12px 12px;
  transform: translateX(-50%);
  background: radial-gradient(circle at 50% 80%, #fff5b8 0 18%, transparent 19%), #2f3842;
  box-shadow: 0 16px 44px rgba(255, 224, 126, 0.45);
}

.panel {
  width: 128px;
  height: 116px;
  border-radius: 8px;
  background: var(--rust);
  box-shadow: inset 0 0 0 10px rgba(255, 255, 255, 0.16), 0 20px 30px rgba(0, 0, 0, 0.16);
}

.panel.blue {
  background: var(--blue);
}

.panel.rust {
  background: var(--rust);
}

.sign {
  width: 118px;
  height: 92px;
  border: 8px solid #5f4229;
  border-radius: 8px;
  background: linear-gradient(135deg, #f6df8d, #e0b84f);
  box-shadow: 0 18px 28px rgba(0, 0, 0, 0.16);
}

.sign::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -58px;
  width: 12px;
  height: 58px;
  transform: translateX(-50%);
  background: #5f4229;
}

.bowl {
  width: 118px;
  height: 58px;
  border-radius: 12px 12px 52px 52px;
  background:
    radial-gradient(ellipse at 50% 14%, rgba(255, 255, 255, 0.8) 0 22%, transparent 23%),
    linear-gradient(180deg, #7dd3fc, #2563eb);
  box-shadow: inset 0 10px 0 rgba(255, 255, 255, 0.34), 0 16px 24px rgba(0, 0, 0, 0.16);
}

.hill {
  width: 300px;
  height: 96px;
  border-radius: 60% 55% 0 0;
  background: color-mix(in srgb, var(--horizon), #263a27 22%);
  opacity: 0.8;
}

.hill.wide {
  width: 430px;
  height: 132px;
}

.viewer-hotspot {
  position: absolute;
  bottom: 36%;
  width: 34px;
  height: 34px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: var(--scene-accent);
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.42), 0 10px 28px rgba(0, 0, 0, 0.2);
  transform: translate(-50%, 50%);
}

.viewer-hotspot::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #ffffff;
}

.viewer-hotspot:hover,
.viewer-hotspot:focus-visible,
.viewer-hotspot.is-selected {
  outline: none;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.42), 0 12px 28px rgba(0, 0, 0, 0.26);
}

.viewer-hotspot.is-visited {
  background: var(--gold);
}

.viewer-hotspot.is-visited::after {
  inset: 9px;
  border: 2px solid var(--scene-accent);
  background: #ffffff;
}

.viewer-hotspot.is-flagged {
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--gold), transparent 32%), 0 10px 28px rgba(0, 0, 0, 0.24);
}

.viewer-hotspot.is-flagged::before {
  content: "";
  position: absolute;
  top: -9px;
  right: -7px;
  width: 13px;
  height: 13px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--gold);
}

.control-panel {
  display: grid;
  gap: 0;
  overflow: hidden;
}

.control-group {
  display: grid;
  gap: 13px;
  border-bottom: 1px solid var(--line);
  padding: 16px;
}

.control-group:last-child {
  border-bottom: 0;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

select {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  padding: 8px 10px;
}

textarea {
  width: 100%;
  min-height: 104px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 11px;
  line-height: 1.4;
}

textarea:focus-visible {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent), transparent 82%);
}

.toggle-row {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.toggle-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.action-button {
  min-height: 42px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  padding: 9px 12px;
  font-weight: 800;
}

.action-button:hover,
.action-button:focus-visible {
  background: var(--accent-dark);
  outline: none;
}

.secondary-action {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  padding: 8px 12px;
  font-weight: 800;
}

.secondary-action:hover,
.secondary-action:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.secondary-action:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.report-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
}

.share-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.scene-summary {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.scene-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0;
}

.scene-metrics div {
  display: grid;
  grid-template-columns: minmax(74px, auto) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.scene-metrics dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.scene-metrics dd {
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.shortcut-list {
  display: grid;
  gap: 8px;
}

.shortcut-list div {
  display: grid;
  grid-template-columns: minmax(94px, auto) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.shortcut-list dt {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 5px 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
  white-space: nowrap;
}

.shortcut-list dd {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.visit-progress {
  height: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}

.visit-progress div {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent), #ffffff 24%));
  transition: width 180ms ease;
}

.global-progress {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.global-progress-header {
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
}

.global-progress h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
}

.global-progress-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.tour-briefing {
  display: grid;
  gap: 7px;
  border: 1px solid color-mix(in srgb, var(--accent), #ffffff 58%);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent), #ffffff 94%);
  padding: 10px;
}

.tour-briefing-header {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.tour-briefing-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.tour-briefing h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.2;
}

.tour-briefing-header .secondary-action {
  min-height: 32px;
  padding: 5px 8px;
  font-size: 12px;
}

.tour-briefing p {
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.tour-briefing p:first-of-type {
  color: var(--accent-dark);
  font-weight: 850;
}

.tour-briefing p:last-child {
  color: var(--muted);
}

.today-focus {
  display: grid;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--blue), #ffffff 52%);
  border-radius: 8px;
  background: color-mix(in srgb, var(--blue), #ffffff 93%);
  padding: 10px;
}

.today-focus-header {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
}

.today-focus h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.2;
}

.today-focus-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.today-focus-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 19px;
}

.today-focus-list li {
  padding-left: 2px;
}

.today-focus-list button {
  display: block;
  width: 100%;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  padding: 0;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.3;
  text-align: left;
}

.today-focus-list button:hover,
.today-focus-list button:focus-visible {
  color: var(--accent-dark);
  outline: none;
  text-decoration: underline;
}

.today-focus-list span,
.today-focus-empty {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.today-focus-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.today-focus-actions .secondary-action {
  min-height: 32px;
  padding: 5px 8px;
  font-size: 12px;
}

.followup-queue {
  display: grid;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--gold), #ffffff 48%);
  border-radius: 8px;
  background: color-mix(in srgb, var(--gold), #ffffff 91%);
  padding: 10px;
}

.followup-queue-header {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
}

.followup-queue h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.2;
}

.followup-queue-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.followup-queue p {
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.followup-filter {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.followup-filter button {
  min-height: 32px;
  border: 1px solid color-mix(in srgb, var(--gold), #ffffff 36%);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.followup-filter button:hover,
.followup-filter button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.followup-filter button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.followup-filter button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.followup-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.followup-list li {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.followup-item-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: stretch;
}

.followup-list button {
  min-height: 34px;
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--gold), #ffffff 36%);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 850;
  text-align: left;
  overflow-wrap: anywhere;
}

.followup-list button.followup-complete {
  width: auto;
  min-width: 72px;
  background: var(--accent);
  color: #ffffff;
  text-align: center;
}

.followup-list button:hover,
.followup-list button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.followup-list button.followup-complete:hover,
.followup-list button.followup-complete:focus-visible {
  background: #ffffff;
}

.followup-list span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.followup-list .followup-empty {
  border: 1px dashed color-mix(in srgb, var(--gold), #ffffff 35%);
  border-radius: 8px;
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.followup-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.followup-actions .secondary-action {
  min-height: 32px;
  padding: 5px 8px;
  font-size: 12px;
}

.progress-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.storage-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.storage-status.is-warning {
  color: var(--rust);
}

.visually-hidden-file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.tour-plan {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.global-route {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
}

.scene-notes {
  display: grid;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.scene-note-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(122px, 1fr));
  gap: 8px;
}

.scene-note-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.scene-note-presets .secondary-action {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 12px;
}

.scene-overview {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.scene-overview-header {
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
}

.scene-overview h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
}

.scene-overview-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.scene-overview-search {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(160px, 0.8fr) repeat(2, auto);
  gap: 8px;
  align-items: end;
}

.scene-overview-search input[type="search"],
.scene-overview-search select {
  min-height: 40px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  padding: 8px 10px;
}

.scene-overview-search input[type="search"]:focus-visible,
.scene-overview-search select:focus-visible {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent), transparent 82%);
}

.scene-overview-filter {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.scene-overview-filter button {
  min-height: 36px;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.scene-overview-filter button:last-child {
  border-right: 0;
}

.scene-overview-filter button:hover,
.scene-overview-filter button:focus-visible,
.scene-overview-filter button.is-active {
  background: var(--accent);
  color: #ffffff;
  outline: none;
}

.scene-overview-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.scene-overview-export-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.scene-overview-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.scene-overview-list li {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 9px;
}

.scene-overview-list li.is-current {
  border-color: color-mix(in srgb, var(--accent), #ffffff 38%);
  box-shadow: inset 3px 0 0 var(--accent);
}

.scene-overview-list .scene-overview-empty {
  border-style: dashed;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
}

.scene-overview-row {
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
  min-width: 0;
}

.scene-overview-row strong {
  min-width: 0;
  font-size: 13px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.scene-overview-row div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
  min-width: 0;
}

.scene-overview-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.scene-overview-row .scene-overview-note {
  border: 1px solid color-mix(in srgb, var(--accent), #ffffff 55%);
  border-radius: 999px;
  background: #ffffff;
  color: var(--accent);
  padding: 1px 6px;
}

.scene-overview-progress {
  height: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.scene-overview-progress div {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}

.scene-overview-card-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 6px;
}

.scene-overview-card-actions.has-flagged-action {
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
}

.scene-overview-list button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 7px 9px;
  font-size: 13px;
  font-weight: 850;
  text-align: left;
}

.scene-overview-list button:hover,
.scene-overview-list button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.scene-overview-list .scene-overview-complete-action {
  border-color: color-mix(in srgb, var(--accent), #ffffff 45%);
  background: color-mix(in srgb, var(--accent), #ffffff 88%);
  color: var(--accent);
}

.scene-overview-list .scene-overview-open-action {
  border-color: color-mix(in srgb, var(--gold), #ffffff 45%);
  background: color-mix(in srgb, var(--gold), #ffffff 86%);
  color: #7c4c00;
}

.scene-overview-list button.scene-overview-flag-action {
  border-color: color-mix(in srgb, var(--rust), #ffffff 42%);
  color: var(--rust);
}

.scene-overview-list button.scene-overview-flag-action:hover,
.scene-overview-list button.scene-overview-flag-action:focus-visible {
  background: color-mix(in srgb, var(--rust), #ffffff 91%);
  border-color: var(--rust);
  color: var(--rust);
}

.tour-plan-header {
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
}

.global-route-header {
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: space-between;
}

.tour-plan h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
}

.global-route h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
}

.tour-plan-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.global-route-header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.tour-plan-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.global-route-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tour-plan-list li {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.global-route-list li {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.tour-plan-list button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 7px 9px;
  font-size: 13px;
  font-weight: 850;
  text-align: left;
}

.global-route-list button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 7px 9px;
  font-size: 13px;
  font-weight: 850;
  text-align: left;
}

.tour-plan-list button:hover,
.tour-plan-list button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.global-route-list button:hover,
.global-route-list button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.tour-plan-list span,
.tour-plan-empty,
.global-route-list span,
.global-route-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.module-list,
.hotspot-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hotspot-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.hotspot-filter {
  display: grid;
  gap: 10px;
}

.hotspot-filter input[type="search"],
.hotspot-filter select {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  padding: 8px 10px;
}

.hotspot-filter input[type="search"]:focus-visible,
.hotspot-filter select:focus-visible {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent), transparent 82%);
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.segmented-control button {
  min-height: 38px;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.segmented-control button:last-child {
  border-right: 0;
}

.segmented-control button:hover,
.segmented-control button:focus-visible,
.segmented-control button.is-active {
  background: var(--accent);
  color: #ffffff;
  outline: none;
}

.filter-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.hotspot-actions button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  font-weight: 800;
}

.hotspot-actions button:nth-child(n + 3) {
  grid-column: 1 / -1;
}

.hotspot-actions button:hover,
.hotspot-actions button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.hotspot-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.module-list li {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 9px 10px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.module-list strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
}

.module-list span,
.hotspot-list small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.hotspot-list .visited-state {
  justify-self: start;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  padding: 3px 8px;
  font-weight: 800;
}

.hotspot-list .visited-state.is-visited {
  border-color: color-mix(in srgb, var(--accent), #ffffff 45%);
  background: color-mix(in srgb, var(--accent), #ffffff 88%);
  color: var(--accent-dark);
}

.hotspot-list .visited-state.is-flagged,
.scene-overview-row .scene-overview-flagged {
  border-color: color-mix(in srgb, var(--gold), #ffffff 38%);
  background: color-mix(in srgb, var(--gold), #ffffff 84%);
  color: #6f4b00;
}

.hotspot-list .visited-state.is-noted {
  border-color: color-mix(in srgb, var(--accent), #ffffff 45%);
  background: #ffffff;
  color: var(--accent);
}

.hotspot-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  justify-content: space-between;
}

.hotspot-list li {
  display: grid;
  gap: 6px;
}

.hotspot-list .hotspot-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
}

.hotspot-list button {
  width: 100%;
  min-height: 40px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
}

.hotspot-list button:hover,
.hotspot-list button:focus-visible,
.hotspot-list button.is-active {
  background: var(--accent-dark);
  outline: none;
}

.hotspot-list button.hotspot-state-toggle {
  width: auto;
  min-height: 30px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  padding: 5px 8px;
  font-size: 12px;
}

.hotspot-list button.hotspot-state-toggle:hover,
.hotspot-list button.hotspot-state-toggle:focus-visible {
  border-color: var(--accent);
  background: var(--surface-soft);
  color: var(--accent);
}

.hotspot-list span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

noscript {
  display: block;
  margin: 18px auto;
  width: min(720px, calc(100% - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  color: var(--ink);
}

@media (max-width: 920px) {
  .topbar,
  .layout {
    grid-template-columns: 1fr;
  }

  .status-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .viewer {
    min-height: 320px;
    max-height: none;
  }
}

@media (max-width: 560px) {
  .app-shell {
    padding: 14px;
  }

  .topbar {
    gap: 14px;
  }

  .status-strip {
    grid-template-columns: 1fr;
  }

  .viewer-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .button-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .icon-button {
    width: 100%;
  }

  .viewer {
    aspect-ratio: 4 / 5;
    min-height: 430px;
  }

  .hotspot-detail {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
  }

  .orientation-strip {
    grid-template-columns: 1fr;
  }

  .compass-readout {
    grid-template-columns: auto 1fr;
    align-items: baseline;
    min-width: 0;
  }

  .scene-overview-search {
    grid-template-columns: 1fr;
  }

  .scene-overview-actions {
    grid-template-columns: 1fr;
  }

  .scene-overview-export-actions {
    grid-template-columns: 1fr;
  }

  .scene-overview-filter {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .panorama-world {
    will-change: auto;
  }
}

/* CYA Suite Dark-Shell-Inkrement: dunkle Hülle und lesbare Kontrollflächen. */
input,
select,
textarea {
  border-color: var(--line);
  background: rgba(7, 11, 20, 0.78);
  color: var(--ink);
}

input::placeholder,
textarea::placeholder {
  color: rgba(185, 199, 216, 0.72);
}

.status-strip div,
.viewer-surface,
.control-panel,
.control-group,
.scene-metrics div,
.global-progress,
.tour-briefing,
.today-focus,
.followup-queue,
.scene-overview,
.scene-overview-progress,
.scene-notes,
.hotspot-list,
.hotspot-detail,
.orientation-strip,
.shortcut-list div,
noscript {
  border-color: var(--line);
  background: linear-gradient(180deg, rgba(18, 28, 46, 0.96), rgba(10, 16, 28, 0.94));
  color: var(--ink);
}

.icon-button,
.action-button,
.secondary-action,
.followup-filter button,
.hotspot-detail-actions button,
.hotspot-list button.hotspot-state-toggle,
.status-link {
  border-color: var(--line);
  background: rgba(13, 20, 34, 0.94);
  color: var(--ink);
}

.icon-button:hover,
.icon-button:focus-visible,
.secondary-action:hover,
.secondary-action:focus-visible,
.followup-filter button:hover,
.followup-filter button:focus-visible,
.followup-filter button[aria-pressed="true"] {
  border-color: rgba(72, 240, 199, 0.62);
  background: rgba(72, 240, 199, 0.16);
  color: var(--ink);
}
