:root {
  color-scheme: dark;
  --bg: #0f1114;
  --panel: #171a20;
  --panel-soft: rgba(23, 26, 32, 0.88);
  --panel-strong: #20252d;
  --line: rgba(255, 255, 255, 0.14);
  --text: #f5f3eb;
  --muted: #a9b1bb;
  --green: #61c7a8;
  --green-strong: #9ce4cc;
  --amber: #e4b765;
  --red: #f28b7a;
  --blue: #85afe8;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

body {
  overflow: hidden;
}

button,
a {
  font: inherit;
}

.hamburger-menu-button {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 38;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  gap: 4px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(22, 26, 32, 0.86);
  box-shadow: var(--shadow);
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.hamburger-menu-button.menu-hidden {
  display: none;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-10px);
}

.hamburger-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.hamburger-menu-button:hover,
.hamburger-menu-button[aria-expanded="true"] {
  border-color: var(--green);
}

.app-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.28);
}

.app-menu {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 44;
  display: flex;
  width: min(320px, calc(100vw - 32px));
  height: 100vh;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: rgba(19, 22, 28, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.app-menu-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.app-menu-header > div {
  min-width: 0;
}

.app-menu-header span {
  color: var(--green-strong);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.app-menu-header h2 {
  margin-top: 5px;
  font-size: 22px;
}

.app-menu-nav {
  display: grid;
  gap: 8px;
}

.app-menu-nav button {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #222832;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  text-align: left;
}

.app-menu-nav button:hover,
.app-menu-nav button:focus-visible {
  border-color: var(--green);
  outline: none;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.app-shell.sidebar-open {
  grid-template-columns: 300px minmax(0, 1fr) 360px;
}

.scene-sidebar,
.guide-panel {
  min-height: 0;
  background: var(--panel);
}

.scene-sidebar {
  display: none;
  flex-direction: column;
  border-right: 1px solid var(--line);
}

.app-shell.sidebar-open .scene-sidebar {
  display: flex;
}

.brand-block {
  padding: 22px 18px 16px;
  border-bottom: 1px solid var(--line);
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.prototype-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(228, 183, 101, 0.5);
  border-radius: 999px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 800;
}

.panel-icon-button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #242a33;
  color: var(--text);
  cursor: pointer;
  line-height: 1;
}

.panel-icon-button:hover {
  border-color: var(--green);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  margin-top: 12px;
  font-size: 25px;
  line-height: 1.12;
}

.brand-block p {
  margin-top: 7px;
  color: var(--muted);
}

.scene-groups {
  min-height: 0;
  overflow: auto;
  padding: 12px;
}

.scene-group {
  padding-bottom: 14px;
}

.scene-group h2 {
  margin: 12px 8px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.scene-button {
  display: grid;
  width: 100%;
  min-height: 56px;
  gap: 4px;
  margin: 6px 0;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #222832;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.scene-button:hover {
  border-color: rgba(156, 228, 204, 0.5);
}

.scene-button.active {
  border-color: var(--green);
  background: #263a36;
}

.scene-button strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scene-button span {
  color: var(--muted);
  font-size: 12px;
}

.viewer-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #040506;
}

#viewerCanvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
  transform-origin: center;
  transition: transform 520ms ease, filter 520ms ease, opacity 520ms ease;
}

#viewerCanvas.dragging {
  cursor: grabbing;
}

.viewer-topbar,
.load-status {
  position: absolute;
  z-index: 2;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.viewer-topbar {
  top: 14px;
  left: 68px;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  padding: 10px 12px;
}

.location-summary {
  min-width: 0;
}

.viewer-topbar strong {
  display: block;
  margin-top: 2px;
  font-size: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floor-label,
.route-status {
  color: var(--green-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.route-status {
  color: var(--amber);
  text-align: right;
}

.viewer-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 240px;
}

.topbar-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(31, 37, 45, 0.88);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.topbar-button:hover {
  border-color: var(--green);
}

.topbar-button.active,
.topbar-button[aria-pressed="true"] {
  border-color: rgba(97, 199, 168, 0.8);
  background: rgba(36, 72, 64, 0.92);
  color: var(--green-strong);
}

.calibration-toggle[aria-pressed="true"] {
  border-color: rgba(228, 183, 101, 0.85);
  background: rgba(73, 57, 29, 0.92);
  color: #ffe0a1;
}

.load-status {
  left: 14px;
  bottom: 14px;
  max-width: min(620px, calc(100% - 28px));
  padding: 10px 12px;
  color: var(--muted);
  font-size: 13px;
}

.walkthrough-help {
  position: absolute;
  left: 14px;
  bottom: 64px;
  z-index: 2;
  display: none;
  gap: 6px;
  width: min(440px, calc(100% - 28px));
  padding: 12px 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(18, 22, 28, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.walkthrough-help p {
  margin: 0;
  color: #edf5f2;
  font-size: 13px;
  line-height: 1.42;
}

.walkthrough-help .quick-copy {
  color: var(--green-strong);
  font-weight: 800;
}

.walkthrough-help .desktop-copy,
.walkthrough-help .mobile-copy {
  color: var(--muted);
  font-size: 12px;
}

.walkthrough-help .mobile-copy {
  display: none;
}

.load-status.error {
  color: var(--red);
}

.viewer-hotspots,
.risk-hotspots {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}

.risk-hotspots {
  z-index: 4;
}

.hotspot-button {
  position: absolute;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  background: rgba(35, 73, 64, 0.78);
  color: #ffffff;
  box-shadow: 0 0 0 8px rgba(97, 199, 168, 0.16), 0 14px 30px rgba(0, 0, 0, 0.36);
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(12px);
  transform: translate(-50%, -50%) scale(1);
  transition: opacity 160ms ease, transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.hotspot-button.primary {
  border-color: rgba(97, 199, 168, 0.72);
  background: rgba(35, 73, 64, 0.9);
}

.hotspot-button.popup {
  border-color: rgba(133, 175, 232, 0.62);
  background: rgba(35, 50, 70, 0.9);
}

.hotspot-button:hover,
.hotspot-button:focus-visible {
  border-color: var(--green);
  box-shadow: 0 0 0 11px rgba(156, 228, 204, 0.2), 0 18px 36px rgba(0, 0, 0, 0.42);
  outline: none;
  transform: translate(-50%, -50%) scale(1.06);
}

.marker-button.out-of-view {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.82);
}

.risk-marker {
  position: absolute;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 0 0 9px rgba(255, 255, 255, 0.09), 0 14px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  transform: translate(-50%, -50%) scale(1);
  transition: opacity 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.risk-marker:hover,
.risk-marker:focus-visible {
  outline: none;
  transform: translate(-50%, -50%) scale(1.08);
}

.risk-marker.out-of-view {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.82);
}

.risk-marker-badge {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.24);
  font-size: 12px;
  font-weight: 950;
}

.risk-marker-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  width: max-content;
  max-width: min(280px, 72vw);
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(16, 20, 26, 0.94);
  color: #ffffff;
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, 5px);
  transition: opacity 140ms ease, transform 140ms ease;
  white-space: normal;
}

.risk-marker:hover .risk-marker-tooltip,
.risk-marker:focus-visible .risk-marker-tooltip,
.risk-marker.show-tooltip .risk-marker-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.risk-marker.risk-e,
.risk-summary-card.risk-e,
.risk-pill.risk-e {
  background: #7f1d1d;
  border-color: rgba(248, 113, 113, 0.86);
}

.risk-marker.risk-h,
.risk-summary-card.risk-h,
.risk-pill.risk-h {
  background: #8a3a16;
  border-color: rgba(251, 146, 60, 0.86);
}

.risk-marker.risk-m,
.risk-summary-card.risk-m,
.risk-pill.risk-m {
  background: #76520f;
  border-color: rgba(250, 204, 21, 0.82);
}

.risk-marker.risk-l,
.risk-summary-card.risk-l,
.risk-pill.risk-l {
  background: #1d4d3a;
  border-color: rgba(74, 222, 128, 0.82);
}

.risk-marker.risk-ai {
  outline: 2px solid rgba(255, 255, 255, 0.72);
  outline-offset: 3px;
}

.marker-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
}

.marker-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  width: max-content;
  max-width: min(260px, 70vw);
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(16, 20, 26, 0.92);
  color: #ffffff;
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, 5px);
  transition: opacity 140ms ease, transform 140ms ease;
  white-space: normal;
}

.marker-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 8px;
  height: 8px;
  background: rgba(16, 20, 26, 0.92);
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  transform: translate(-50%, -4px) rotate(45deg);
}

.marker-button:hover .marker-tooltip,
.marker-button:focus-visible .marker-tooltip,
.marker-button.show-tooltip .marker-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.marker-support {
  border-color: rgba(133, 175, 232, 0.72);
  background: rgba(28, 47, 72, 0.82);
  box-shadow: 0 0 0 8px rgba(133, 175, 232, 0.14), 0 14px 30px rgba(0, 0, 0, 0.36);
}

.marker-risk {
  border-color: rgba(242, 139, 122, 0.88);
  background: rgba(92, 38, 32, 0.86);
  box-shadow: 0 0 0 9px rgba(242, 139, 122, 0.18), 0 14px 30px rgba(0, 0, 0, 0.38);
}

.marker-upstairs {
  border-color: rgba(228, 183, 101, 0.86);
  background: rgba(78, 59, 28, 0.86);
  box-shadow: 0 0 0 8px rgba(228, 183, 101, 0.16), 0 14px 30px rgba(0, 0, 0, 0.36);
}

.marker-back {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(36, 42, 52, 0.78);
  box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.1), 0 14px 30px rgba(0, 0, 0, 0.34);
}

.marker-final {
  border-color: rgba(156, 228, 204, 0.95);
  background: rgba(38, 85, 76, 0.9);
  box-shadow: 0 0 0 10px rgba(156, 228, 204, 0.2), 0 14px 32px rgba(0, 0, 0, 0.38);
}

.app-shell.calibration-mode .viewer-hotspots {
  display: block;
}

.hotspot-button.cue-pulse,
.action-button.cue-pulse,
.prev-next button.cue-pulse,
.scene-button.cue-pulse {
  animation: cue-pulse 420ms ease both;
}

.app-shell.transition-busy .hotspot-button,
.app-shell.transition-busy .action-button,
.app-shell.transition-busy .prev-next button,
.app-shell.transition-busy .scene-button,
.app-shell.transition-busy .topbar-button,
.app-shell.transition-busy .document-button {
  pointer-events: none;
}

.transition-overlay {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 16px 22px;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, background 360ms ease;
}

.transition-overlay.visible {
  opacity: 1;
}

.transition-caption {
  max-width: min(360px, calc(100% - 32px));
  margin: 0;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(15, 17, 20, 0.42);
  color: rgba(245, 243, 235, 0.92);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  backdrop-filter: blur(8px);
  transform: translateY(6px);
  transition: transform 160ms ease, opacity 160ms ease;
}

.transition-overlay.visible .transition-caption {
  transform: translateY(0);
}

.viewer-stage.transitioning.walk-forward #viewerCanvas,
.viewer-stage.transitioning.free-explore #viewerCanvas {
  opacity: 0.96;
  transform: scale(1.015);
  filter: brightness(0.98) saturate(1);
}

.viewer-stage.transitioning.enter #viewerCanvas {
  opacity: 0.94;
  transform: scale(1.028);
  filter: brightness(0.96) saturate(1);
}

.viewer-stage.transitioning.exit #viewerCanvas,
.viewer-stage.transitioning.back #viewerCanvas {
  opacity: 0.96;
  transform: scale(0.995);
  filter: brightness(0.98) saturate(1);
}

.viewer-stage.transitioning.upstairs #viewerCanvas {
  opacity: 0.95;
  transform: translateY(-8px) scale(1.02);
  filter: brightness(0.97) saturate(1);
}

.viewer-stage.transitioning.risk-focus #viewerCanvas {
  opacity: 0.95;
  transform: scale(1.02);
  filter: brightness(0.96) saturate(1.04);
}

.viewer-stage.transitioning.enter-final #viewerCanvas {
  opacity: 0.96;
  transform: scale(1.025);
  filter: brightness(0.98) saturate(1.02);
}

.viewer-stage.walk-forward .transition-overlay,
.viewer-stage.free-explore .transition-overlay {
  background: transparent;
}

.viewer-stage.enter .transition-overlay {
  background: rgba(5, 7, 10, 0.04);
}

.viewer-stage.exit .transition-overlay,
.viewer-stage.back .transition-overlay {
  background: transparent;
}

.viewer-stage.upstairs .transition-overlay {
  background: linear-gradient(180deg, rgba(97, 199, 168, 0.06), rgba(4, 8, 11, 0.04));
}

.viewer-stage.risk-focus .transition-overlay {
  background: radial-gradient(circle at 50% 48%, rgba(228, 183, 101, 0.08), rgba(33, 12, 10, 0.04));
}

.viewer-stage.enter-final .transition-overlay {
  background: radial-gradient(circle at 50% 48%, rgba(97, 199, 168, 0.08), rgba(4, 8, 11, 0.04));
}

.app-shell.tour-complete .route-status {
  color: var(--green-strong);
}

.app-shell.tour-complete .guide-header {
  border-color: rgba(156, 228, 204, 0.42);
  background: linear-gradient(145deg, #213630, #20252d);
}

.calibration-panel {
  position: absolute;
  top: 92px;
  left: 14px;
  z-index: 5;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100% - 28px));
  max-height: calc(100% - 154px);
  overflow: auto;
  padding: 13px;
  border: 1px solid rgba(228, 183, 101, 0.48);
  border-radius: 8px;
  background: rgba(20, 24, 30, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.calibration-panel header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.calibration-panel header span,
.calibration-panel label {
  color: var(--amber);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.calibration-panel header strong {
  display: block;
  margin-top: 3px;
  font-size: 16px;
  line-height: 1.2;
}

.calibration-panel select,
.calibration-panel button {
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #27303a;
  color: var(--text);
}

.calibration-panel select {
  width: 100%;
  padding: 0 10px;
}

.calibration-panel button {
  padding: 0 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.calibration-panel button:hover {
  border-color: var(--green);
}

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

.calibration-values div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.calibration-values dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.calibration-values dd {
  margin: 0;
  color: var(--green-strong);
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.calibration-help,
.calibration-copy-status {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.calibration-copy-status {
  min-height: 18px;
  margin-top: 8px;
  color: var(--green-strong);
}

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

.calibration-action-list li {
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-size: 12px;
}

.calibration-action-list li.active {
  border-color: rgba(97, 199, 168, 0.72);
  background: rgba(36, 72, 64, 0.42);
}

.calibration-action-list strong {
  color: var(--green-strong);
  font-size: 12px;
}

.calibration-action-list span {
  color: var(--muted);
}

.calibration-marker {
  position: absolute;
  z-index: 6;
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 7px rgba(228, 183, 101, 0.2), 0 10px 24px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.app-shell.calibration-mode #viewerCanvas {
  cursor: crosshair;
}

.guide-panel {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  padding: 16px;
  border-left: 1px solid var(--line);
}

.guide-header {
  padding: 14px;
  border-radius: 8px;
  background: linear-gradient(145deg, #1e272a, #20252d);
  border: 1px solid var(--line);
}

.guide-header span {
  color: var(--green-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.guide-header h2 {
  margin-top: 7px;
  font-size: 22px;
  line-height: 1.18;
}

.location-badge {
  display: inline-flex;
  width: fit-content;
  margin-top: 10px;
  padding: 5px 9px;
  border: 1px solid rgba(97, 199, 168, 0.35);
  border-radius: 999px;
  background: rgba(97, 199, 168, 0.1);
  color: var(--green-strong);
  font-size: 12px;
  font-weight: 800;
}

.guide-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.guide-card h3 {
  margin-bottom: 8px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.guide-card p {
  color: #e9edf1;
  line-height: 1.48;
}

.guide-card.compact p {
  color: var(--muted);
  font-size: 13px;
}

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

.location-risk-grid div {
  min-height: 68px;
  padding: 10px;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.location-risk-grid span,
.location-risk-grid small {
  display: block;
  color: currentColor;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.location-risk-grid strong {
  display: block;
  margin: 3px 0;
  color: #fff;
  font-size: 24px;
}

.location-table-wrap {
  overflow: auto;
}

.location-findings-table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  font-size: 12px;
}

.location-findings-table th,
.location-findings-table td {
  padding: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
  vertical-align: top;
}

.location-findings-table th {
  color: var(--green-strong);
  font-size: 11px;
  text-transform: uppercase;
}

.location-findings-table tbody tr {
  cursor: pointer;
}

.location-findings-table tbody tr:hover,
.location-findings-table tbody tr.focused-finding {
  background: rgba(97, 199, 168, 0.08);
}

.finding-detail-card dl {
  display: grid;
  gap: 9px;
  margin: 10px 0 0;
}

.finding-detail-card div {
  display: grid;
  gap: 3px;
}

.finding-detail-card dt {
  color: var(--green-strong);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.finding-detail-card dd {
  margin: 0;
  color: #edf4f1;
  line-height: 1.42;
}

.finding-status-badge {
  display: inline-flex;
  width: fit-content;
  padding: 5px 9px;
  border: 1px solid rgba(228, 183, 101, 0.45);
  border-radius: 999px;
  color: #ffe0a1;
  font-size: 12px;
  font-weight: 900;
}

.location-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
  color: #e9edf1;
  line-height: 1.42;
}

.location-panel-actions {
  display: grid;
  gap: 8px;
}

.location-panel-actions button {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #28303a;
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.location-panel-actions button:hover:not(:disabled) {
  border-color: var(--green);
}

.location-panel-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.action-buttons {
  display: grid;
  gap: 8px;
}

.walkthrough-dock {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 18;
  display: flex;
  width: auto;
  max-width: none;
  gap: 8px;
  pointer-events: none;
  transform: translateX(-50%);
}

.dock-actions {
  display: none;
}

.bottom-nav-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
  pointer-events: auto;
}

.bottom-nav-controls button {
  display: grid;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(34, 40, 50, 0.62);
  color: var(--text);
  cursor: pointer;
  font-size: 20px;
  font-weight: 800;
  backdrop-filter: blur(14px);
}

.quick-menu button {
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(34, 40, 50, 0.92);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
  backdrop-filter: blur(14px);
}

.bottom-nav-controls button:hover:not(:disabled),
.quick-menu button:hover:not(:disabled) {
  border-color: var(--green);
  background: rgba(40, 48, 58, 0.82);
}

.bottom-nav-controls button:disabled,
.quick-menu button:disabled {
  cursor: not-allowed;
  opacity: 0.44;
}

.quick-menu {
  position: absolute;
  left: 14px;
  bottom: 16px;
  z-index: 19;
  display: none;
  width: min(300px, calc(100% - 28px));
  flex-wrap: wrap;
  gap: 8px;
  pointer-events: auto;
}

.action-intro {
  padding: 9px 10px;
  border: 1px solid rgba(97, 199, 168, 0.24);
  border-radius: 8px;
  background: rgba(97, 199, 168, 0.08);
  color: #d8f3ea !important;
  font-size: 13px;
  line-height: 1.45;
}

.action-button,
.prev-next button,
.document-button {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #28303a;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.action-button {
  padding: 9px 10px;
  min-height: 38px;
  background: rgba(40, 48, 58, 0.9);
  backdrop-filter: blur(14px);
}

.action-button.primary {
  border-color: rgba(97, 199, 168, 0.65);
  background: #29433c;
}

.action-button.popup {
  border-color: rgba(133, 175, 232, 0.45);
  background: #273343;
}

.action-button:hover,
.prev-next button:hover,
.document-button:hover {
  border-color: var(--green);
}

.prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.prev-next button {
  padding: 0 10px;
  text-align: center;
}

.prev-next button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.document-button {
  display: grid;
  place-items: center;
  min-height: 46px;
  padding: 0 12px;
  border-color: rgba(228, 183, 101, 0.45);
  background: #3a3324;
  color: #ffe0a1;
  font-weight: 800;
  text-decoration: none;
}

.document-panel {
  display: grid;
  gap: 12px;
}

.document-floating-panel {
  position: fixed;
  right: 380px;
  bottom: 18px;
  z-index: 46;
  width: min(420px, calc(100vw - 36px));
  max-height: min(620px, calc(100vh - 36px));
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(32, 37, 45, 0.98);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.document-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.document-panel-header span {
  color: var(--green-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.document-panel-header h3 {
  margin: 5px 0 0;
}

.document-panel-intro {
  color: var(--muted) !important;
  font-size: 13px;
}

.document-cards {
  display: grid;
  gap: 10px;
}

.document-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(15, 17, 20, 0.36);
}

.document-card h4 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.32;
}

.document-type {
  color: var(--amber) !important;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.document-description {
  color: #d8dde4 !important;
  font-size: 13px;
}

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

.document-card-link {
  display: grid;
  min-height: 36px;
  place-items: center;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #28303a;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.document-card-link.primary {
  border-color: rgba(97, 199, 168, 0.65);
  background: #29433c;
}

.document-card-link:hover {
  border-color: var(--green);
}

.module-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.module-tabs button,
.risk-review-actions button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #28303a;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.module-tabs button.active,
.module-tabs button:hover,
.risk-review-actions button:hover {
  border-color: rgba(97, 199, 168, 0.68);
  background: #29433c;
}

.risk-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.risk-review-table td {
  vertical-align: top;
}

.risk-review-table th:last-child,
.risk-review-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 188px;
  background: #1b2028;
  box-shadow: -10px 0 16px rgba(0, 0, 0, 0.16);
}

.risk-review-table th:last-child {
  z-index: 3;
  background: #20252d;
}

.risk-revision-form {
  display: grid;
  gap: 12px;
}

.risk-revision-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.risk-revision-form textarea,
.risk-revision-form input,
.risk-revision-form select {
  width: 100%;
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #161b22;
  color: var(--text);
}

.photo-evidence-card {
  gap: 12px;
}

.photo-evidence-preview {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #0f1318;
}

.photo-evidence-preview img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
}

.image-risk-marker {
  position: absolute;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 950;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.14), 0 10px 22px rgba(0, 0, 0, 0.38);
}

.image-risk-marker.risk-e { background: #7f1d1d; }
.image-risk-marker.risk-h { background: #8a3a16; }
.image-risk-marker.risk-m { background: #76520f; }
.image-risk-marker.risk-l { background: #1d4d3a; }

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

.photo-risk-item {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.photo-risk-item span {
  color: var(--amber);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.photo-risk-item h5,
.photo-risk-item p {
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.module-layer {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: grid;
  align-items: center;
  justify-content: center;
  padding: 74px 22px 22px;
  pointer-events: none;
}

.module-panel {
  display: grid;
  width: min(1120px, calc(100vw - 44px));
  max-height: calc(100vh - 96px);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(22, 26, 32, 0.96);
  box-shadow: var(--shadow);
  pointer-events: auto;
  backdrop-filter: blur(18px);
}

.module-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.module-panel-header span {
  color: var(--green-strong);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.module-panel-header h2 {
  margin-top: 4px;
  font-size: 26px;
}

.module-panel-header p {
  margin-top: 7px;
  color: var(--muted);
}

.module-content {
  display: grid;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding: 16px;
}

.module-toolbar,
.module-note {
  padding: 12px 13px;
  border: 1px solid rgba(97, 199, 168, 0.24);
  border-radius: 8px;
  background: rgba(97, 199, 168, 0.08);
}

.module-toolbar p,
.module-note p,
.module-muted {
  color: #dce9e5;
  font-size: 13px;
  line-height: 1.5;
}

.module-note h3 {
  margin-bottom: 6px;
  color: var(--amber);
  font-size: 14px;
}

.module-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.risk-review-table-wrap {
  min-height: min(440px, 58vh);
  max-height: min(560px, calc(100vh - 240px));
  position: relative;
}

.module-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
  background: rgba(15, 17, 20, 0.42);
}

.module-table th,
.module-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #edf1f4;
  font-size: 13px;
  line-height: 1.35;
  text-align: left;
  vertical-align: top;
}

.module-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #20252d;
  color: var(--green-strong);
  font-size: 12px;
  text-transform: uppercase;
}

.checklist-group-row td {
  background: rgba(228, 183, 101, 0.12);
  color: #ffe0a1;
  font-weight: 900;
}

.status-select,
.notes-input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #171d25;
  color: var(--text);
  font: inherit;
}

.status-select {
  min-width: 130px;
  min-height: 36px;
  padding: 0 8px;
}

.notes-input {
  min-width: 210px;
  padding: 8px;
  resize: vertical;
}

.risk-summary-cards,
.info-grid,
.export-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.risk-summary-card,
.info-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(15, 17, 20, 0.34);
}

.risk-summary-card {
  display: grid;
  gap: 4px;
  color: #ffffff;
}

.risk-summary-card span,
.risk-summary-card small {
  font-size: 12px;
  font-weight: 800;
}

.risk-summary-card strong {
  font-size: 32px;
  line-height: 1;
}

.info-card h3 {
  margin-bottom: 7px;
  color: var(--amber);
  font-size: 14px;
}

.info-card p {
  color: #dfe5eb;
  font-size: 13px;
  line-height: 1.48;
}

.risk-pill {
  display: inline-grid;
  min-height: 28px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.export-button {
  display: grid;
  place-items: center;
  min-height: 50px;
  padding: 0 12px;
  border: 1px solid rgba(97, 199, 168, 0.5);
  border-radius: 8px;
  background: #29433c;
  color: var(--green-strong);
  cursor: pointer;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.export-button:hover {
  border-color: var(--amber);
}

.hidden {
  display: none !important;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.66);
  animation: modal-fade-in 180ms ease both;
}

.modal-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(260px, 0.8fr);
  width: min(980px, 100%);
  max-height: min(720px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  animation: modal-rise-in 220ms ease both;
}

.modal-card img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: contain;
  background: #090a0d;
}

.modal-body {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 24px;
}

.modal-body h2 {
  font-size: 24px;
  line-height: 1.14;
}

.modal-body p {
  color: var(--muted);
  line-height: 1.5;
}

.modal-notes {
  color: var(--amber) !important;
  font-size: 13px;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(15, 17, 20, 0.85);
  color: var(--text);
  cursor: pointer;
  font-size: 20px;
}

.sahabat {
  --sk-ink: #102a3c;
  --sk-teal: #1f8a8c;
  --sk-teal-tua: #14696b;
  --sk-vest: #e3e24a;
  --sk-vest-tua: #c7c63c;
  --sk-reflektif: #d6dde6;
  --sk-helm: #f6f8fb;
  --sk-helm-bayang: #dfe6ee;
  --sk-kulit: #f4c79c;
  --sk-kulit-tua: #e0a878;
  --sk-amber: #f5a524;
  --sk-amber-tua: #d98a05;
  --sk-papan: #123a52;
  --sk-kertas: #fbfdff;
  --sk-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  position: fixed;
  right: 382px;
  bottom: 18px;
  z-index: 20;
  font-family: var(--sk-font);
  -webkit-user-select: none;
  user-select: none;
}

.sahabat-kartu {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  width: 238px;
}

.sahabat-gelembung {
  position: relative;
  width: 100%;
  max-height: 220px;
  overflow: auto;
  padding: 12px 36px 13px 14px;
  border: 1px solid #e7edf3;
  border-radius: 16px;
  background: #ffffff;
  color: var(--sk-ink);
  box-shadow: 0 12px 28px -10px rgba(16, 42, 60, .28);
  animation: sk-muncul .35s ease both;
}

.sahabat-gelembung::after {
  content: "";
  position: absolute;
  right: 34px;
  bottom: -7px;
  width: 14px;
  height: 14px;
  border-right: 1px solid #e7edf3;
  border-bottom: 1px solid #e7edf3;
  background: #ffffff;
  transform: rotate(45deg);
}

.sahabat-nama {
  margin: 0 0 3px;
  color: var(--sk-teal);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.sahabat-lokasi {
  margin: 0 0 6px;
  color: #647482;
  font-size: 12px;
  font-weight: 700;
}

.sahabat-pesan {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
}

.sahabat-tutup {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: #eef3f7;
  color: var(--sk-ink);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  transition: background .15s ease;
}

.sahabat-tutup:hover {
  background: #dde7ef;
}

.sahabat-avatar {
  width: 150px;
  height: 178px;
  margin-right: 6px;
  cursor: pointer;
  animation: sk-mengambang 4.2s ease-in-out infinite;
}

.sahabat-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.sahabat .lengan-angkat,
.sahabat .lengan-tunjuk {
  display: none;
}

.sahabat.is-wave .lengan-istirahat,
.sahabat.is-alert .lengan-istirahat,
.sahabat.is-point .lengan-istirahat {
  display: none;
}

.sahabat.is-wave .lengan-angkat,
.sahabat.is-alert .lengan-angkat {
  display: block;
}

.sahabat.is-point .lengan-tunjuk {
  display: block;
}

.sahabat .mulut-lebar,
.sahabat .mulut-waspada {
  display: none;
}

.sahabat.is-wave .mulut-senyum {
  display: none;
}

.sahabat.is-wave .mulut-lebar {
  display: block;
}

.sahabat.is-alert .mulut-senyum {
  display: none;
}

.sahabat.is-alert .mulut-waspada {
  display: block;
}

.sahabat .alis-naik {
  display: none;
}

.sahabat.is-alert .alis {
  display: none;
}

.sahabat.is-alert .alis-naik {
  display: block;
}

.sahabat .lencana-waspada,
.sahabat .cincin-waspada {
  display: none;
}

.sahabat.is-alert .lencana-waspada,
.sahabat.is-alert .cincin-waspada {
  display: block;
}

.sahabat .lengan-angkat,
.sahabat .lengan-tunjuk {
  transform-box: view-box;
  transform-origin: 150px 124px;
}

.sahabat.is-wave .lengan-angkat {
  animation: sk-melambai .7s ease-in-out infinite;
}

.sahabat.is-alert .lengan-angkat {
  animation: sk-siaga 1.6s ease-in-out infinite;
}

.sahabat.is-point .lengan-tunjuk {
  animation: sk-tunjuk 1.1s ease-in-out infinite;
}

.sahabat.is-alert .lencana-waspada {
  animation: sk-denyut 1s ease-in-out infinite;
  transform-box: view-box;
  transform-origin: 182px 42px;
}

.sahabat.is-alert .cincin-waspada {
  animation: sk-cincin 1.6s ease-out infinite;
  transform-box: view-box;
  transform-origin: 182px 42px;
}

@keyframes sk-mengambang {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes sk-muncul {
  from { opacity: 0; transform: translateY(6px) scale(.97); }
  to { opacity: 1; transform: none; }
}

@keyframes sk-melambai {
  0%, 100% { transform: rotate(-9deg); }
  50% { transform: rotate(11deg); }
}

@keyframes sk-siaga {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(3deg); }
}

@keyframes sk-tunjuk {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(3px, -3px); }
}

@keyframes sk-denyut {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

@keyframes sk-cincin {
  0% { transform: scale(.6); opacity: .6; }
  100% { transform: scale(1.7); opacity: 0; }
}

@keyframes cue-pulse {
  0% { transform: scale(1); box-shadow: var(--shadow); }
  48% { transform: scale(1.06); box-shadow: 0 0 0 7px rgba(156, 228, 204, 0.22), var(--shadow); }
  100% { transform: scale(1); box-shadow: var(--shadow); }
}

@keyframes transition-rise {
  0% { transform: translateY(18px) scale(.98); opacity: .1; }
  100% { transform: translateY(-8px) scale(1); opacity: 1; }
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-rise-in {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: none; }
}

.sahabat-peluncur {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 14px 9px 10px;
  border: none;
  border-radius: 999px;
  background: var(--sk-teal);
  color: #fff;
  box-shadow: 0 10px 24px -8px rgba(20, 105, 107, .6);
  cursor: pointer;
  font-family: var(--sk-font);
  font-size: 13px;
  font-weight: 600;
  animation: sk-muncul .3s ease both;
}

.sahabat-peluncur:hover {
  background: var(--sk-teal-tua);
}

.sahabat-peluncur svg {
  display: block;
  width: 22px;
  height: 22px;
}

.sahabat[data-tampil="false"] .sahabat-kartu {
  display: none;
}

.sahabat[data-tampil="false"] .sahabat-peluncur {
  display: inline-flex;
}

@media (prefers-reduced-motion: reduce) {
  #viewerCanvas,
  .transition-overlay,
  .transition-caption,
  .modal-backdrop,
  .modal-card,
  .hotspot-button.cue-pulse,
  .action-button.cue-pulse,
  .prev-next button.cue-pulse,
  .scene-button.cue-pulse,
  .sahabat-avatar,
  .sahabat .lengan-angkat,
  .sahabat .lengan-tunjuk,
  .sahabat .lencana-waspada,
  .sahabat .cincin-waspada,
  .sahabat-gelembung,
  .sahabat-peluncur {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .app-shell.sidebar-open {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .guide-panel {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 320px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .location-findings-card,
  .finding-detail-card,
  .module-layer {
    grid-column: 1 / -1;
  }

  .walkthrough-dock {
    width: auto;
    max-width: none;
  }

  .document-floating-panel {
    right: 18px;
    bottom: 96px;
  }

  .risk-summary-cards,
  .info-grid,
  .export-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sahabat {
    right: 22px;
    bottom: 340px;
  }
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 62vh auto;
    min-height: 100vh;
    height: auto;
  }

  .app-shell.sidebar-open {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(320px, 42vh) 62vh auto;
  }

  .scene-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .scene-groups {
    display: grid;
    gap: 12px;
    overflow: auto;
  }

  .scene-group {
    min-width: 0;
  }

  .guide-panel {
    display: flex;
    max-height: none;
  }

  .walkthrough-dock {
    right: auto;
    bottom: 16px;
    left: 50%;
    width: auto;
    max-width: none;
    transform: translateX(-50%);
  }

  .bottom-nav-controls {
    justify-content: center;
    overflow: visible;
  }

  .quick-menu {
    display: none;
  }

  .document-floating-panel {
    right: 12px;
    bottom: 78px;
    width: calc(100vw - 24px);
    max-height: calc(100vh - 96px);
  }

  .modal-card {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .modal-card img {
    min-height: 220px;
    max-height: 46vh;
  }

  .walkthrough-help {
    bottom: 48px;
    width: min(360px, calc(100% - 28px));
  }

  .walkthrough-help .welcome-copy,
  .walkthrough-help .desktop-copy {
    display: none;
  }

  .walkthrough-help .mobile-copy {
    display: block;
  }

  .viewer-topbar {
    align-items: flex-start;
    flex-direction: column;
    left: 64px;
  }

  .viewer-controls {
    justify-content: flex-start;
    min-width: 0;
  }

  .calibration-panel {
    top: 132px;
    max-height: calc(100% - 154px);
  }

  .document-card-actions {
    grid-template-columns: 1fr;
  }

  .module-layer {
    align-items: start;
    padding: 68px 12px 12px;
  }

  .module-panel {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 80px);
  }

  .module-panel-header {
    padding: 14px;
  }

  .module-panel-header h2 {
    font-size: 21px;
  }

  .risk-summary-cards,
  .info-grid,
  .export-grid {
    grid-template-columns: 1fr;
  }

  .sahabat {
    right: 12px;
    bottom: 150px;
  }

  .sahabat-kartu {
    width: 172px;
  }

  .sahabat-avatar {
    width: 128px;
    height: 152px;
  }
}
