:root {
  --bg: #242424;
  --bg-soft: rgba(44, 44, 44, 0.88);
  --panel: rgba(54, 54, 54, 0.92);
  --stroke: rgba(255, 255, 255, 0.1);
  --ink: #f2f0ea;
  --muted: #b6b2a7;
  --accent: #eba546;
  --accent-2: #8db14e;
}

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

body {
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  overflow: hidden;
}

body.modal-open {
  overflow: hidden;
}

.viewer-shell {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(129, 158, 69, 0.12), transparent 20%),
    radial-gradient(circle at bottom left, rgba(235, 165, 70, 0.06), transparent 18%),
    var(--bg);
}

.canvas-wrap,
.map-panel {
  position: absolute;
  inset: 0;
}

.layout-viewport {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 72px 24px 170px;
  perspective: 2200px;
  perspective-origin: 50% 42%;
  cursor: grab;
  touch-action: none;
}

.layout-viewport.is-dragging {
  cursor: grabbing;
}

.layout-stage {
  --layout-zoom: 1;
  --board-spin: -15deg;
  --board-tilt: 54deg;
  --pan-x: 0px;
  --pan-y: 0px;
  position: relative;
  width: min(1050px, calc(100vw - 48px));
  aspect-ratio: 1050 / 722;
  max-height: calc(100vh - 242px);
  max-height: calc(100dvh - 242px);
  transform-style: preserve-3d;
  transform: translate(var(--pan-x), var(--pan-y)) scale(var(--layout-zoom));
  transition: transform 0.28s ease;
}

.layout-stage-shadow {
  position: absolute;
  inset: 7% 10% 2%;
  border-radius: 30px;
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0));
  transform: translateZ(-80px) rotateX(86deg) scale(1.02);
  filter: blur(18px);
  opacity: 0.9;
}

.layout-surface {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  overflow: visible;
  background: transparent;
  transform-style: preserve-3d;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.layout-viewport.is-3d .layout-surface {
  transform: rotateX(var(--board-tilt)) rotateZ(var(--board-spin)) translateY(10px) translateZ(6px);
  filter: drop-shadow(0 34px 50px rgba(0, 0, 0, 0.26));
}

.layout-stage.is-flat .layout-surface {
  transform: rotateZ(var(--board-spin));
  filter: drop-shadow(0 20px 44px rgba(0, 0, 0, 0.22));
}

.layout-stage.is-flat .layout-stage-shadow {
  opacity: 0.45;
}

.layout-stage.is-north-up {
  --board-spin: 0deg;
}

.layout-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 22px;
  backface-visibility: hidden;
  mix-blend-mode: multiply;
  filter: saturate(1.02) contrast(1.04);
}

.plot-layer {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.plot-hotspot {
  position: absolute;
  transform: translate(-50%, -50%) rotate(var(--plot-rotate, 0deg)) translateZ(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.2%;
  height: 8%;
  border: 2px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transform-style: preserve-3d;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 20px rgba(0, 0, 0, 0.14);
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.layout-viewport.is-dragging .plot-hotspot {
  pointer-events: none;
}

.plot-hotspot::before,
.plot-hotspot::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.plot-hotspot::before {
  inset: auto 0 calc(var(--plot-depth, 14px) * -1) 0;
  height: var(--plot-depth, 14px);
  border-radius: 0 0 8px 8px;
  background: linear-gradient(180deg, rgba(7, 20, 24, 0.18), rgba(7, 20, 24, 0.68));
  transform: rotateX(-90deg);
  transform-origin: top center;
}

.plot-hotspot::after {
  inset: 0 auto 0 calc(100% - 1px);
  width: var(--plot-depth, 14px);
  border-radius: 0 8px 8px 0;
  background: linear-gradient(90deg, rgba(4, 13, 16, 0.16), rgba(4, 13, 16, 0.52));
  transform: rotateY(90deg);
  transform-origin: left center;
}

.plot-hotspot:hover,
.plot-hotspot.is-hovered,
.plot-hotspot.is-active {
  border-color: rgba(255, 190, 88, 0.9);
  background: rgba(255, 190, 88, 0.12);
  box-shadow: 0 0 0 1px rgba(255, 190, 88, 0.25);
}

.plot-hotspot.is-dimmed {
  opacity: 0.22;
}

.plot-hotspot.is-active {
  transform: translate(-50%, -50%) rotate(var(--plot-rotate, 0deg)) translateZ(30px) scale(1.03);
  background: rgba(255, 190, 88, 0.2);
}

.plot-hotspot.status-1 {
  background: linear-gradient(180deg, rgba(117, 239, 244, 0.64), rgba(79, 215, 223, 0.34));
}

.plot-hotspot.status-2 {
  background: linear-gradient(180deg, rgba(255, 183, 148, 0.7), rgba(240, 149, 105, 0.42));
}

.plot-hotspot.status-3 {
  background: linear-gradient(180deg, rgba(202, 232, 115, 0.68), rgba(176, 212, 74, 0.38));
}

.plot-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.15rem;
  min-height: 1.45rem;
  padding: 0.08rem 0.28rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(20, 25, 28, 0.64);
  color: #f6fbfb;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
  transition: transform 0.16s ease, opacity 0.16s ease, background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.plot-hotspot.status-1 .plot-number {
  background: rgba(79, 215, 223, 0.9);
  border-color: rgba(185, 247, 248, 0.95);
  color: #07383f;
}

.plot-hotspot.status-2 .plot-number {
  background: rgba(240, 149, 105, 0.92);
  border-color: rgba(255, 212, 190, 0.95);
  color: #44180c;
}

.plot-hotspot.status-3 .plot-number {
  background: rgba(176, 212, 74, 0.92);
  border-color: rgba(239, 255, 198, 0.95);
  color: #243206;
}

.plot-hotspot.is-hovered .plot-number,
.plot-hotspot.is-active .plot-number {
  transform: scale(1.06);
}

.layout-stage.is-flat .plot-hotspot {
  transform: translate(-50%, -50%) rotate(var(--plot-rotate, 0deg));
}

.layout-stage.is-flat .plot-hotspot::before,
.layout-stage.is-flat .plot-hotspot::after {
  opacity: 0;
}

.map-panel {
  background:
    linear-gradient(180deg, rgba(42, 42, 42, 0.9), rgba(38, 38, 38, 0.96)),
    repeating-linear-gradient(to right, rgba(255,255,255,0.04) 0 1px, transparent 1px 60px),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 60px),
    #2a2a2a;
}

.map-grid {
  position: absolute;
  inset: 11% 14% 18% 14%;
  border: 2px solid rgba(255,255,255,0.08);
  border-radius: 2px;
}

.map-grid::before,
.map-grid::after {
  content: "";
  position: absolute;
  background: rgba(132, 156, 74, 0.8);
}

.map-grid::before {
  inset: 10% 10% 10% auto;
  width: 18%;
  clip-path: polygon(0 0, 100% 12%, 84% 100%, 0 80%);
}

.map-grid::after {
  left: 0;
  right: 0;
  bottom: 0;
  height: 12%;
  clip-path: polygon(0 34%, 60% 24%, 82% 70%, 100% 0, 100% 100%, 0 100%);
}

.map-overlay-copy {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  max-width: 260px;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: rgba(34, 34, 34, 0.84);
  border: 1px solid var(--stroke);
  color: var(--muted);
}

.brand-hud {
  position: absolute;
  top: max(8px, env(safe-area-inset-top));
  left: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.95rem;
  padding: 0.8rem 1rem;
}

.brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
}

.brand-mark-main {
  position: absolute;
  inset: 0;
  background: var(--accent);
  clip-path: polygon(0 42%, 34% 6%, 68% 6%, 100% 36%, 100% 100%, 74% 100%, 74% 42%, 26% 42%, 26% 100%, 0 100%);
  border-radius: 6px;
}

.brand-mark-cut {
  position: absolute;
  left: 14px;
  top: 16px;
  width: 10px;
  height: 20px;
  background: var(--bg);
  border-radius: 2px;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
}

.brand-sub {
  margin-top: 0.15rem;
  font-size: 0.76rem;
  color: rgba(255,255,255,0.56);
  max-width: 340px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.helper-panel {
  position: absolute;
  top: 74px;
  left: 18px;
  z-index: 24;
  width: min(340px, calc(100vw - 36px));
  padding: 14px 16px 16px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(42, 46, 53, 0.86), rgba(26, 30, 36, 0.86));
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.helper-kicker {
  color: rgba(255, 201, 109, 0.92);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.helper-title {
  margin-top: 0.35rem;
  color: #f1f4f7;
  font-size: 0.97rem;
  line-height: 1.45;
}

.helper-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.helper-points span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(233, 239, 243, 0.72);
  font-size: 0.8rem;
}

.helper-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(235, 240, 244, 0.76);
  font-size: 1.3rem;
  line-height: 1;
}

.status-strip {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: min(560px, calc(100vw - 380px));
}

.status-chip {
  min-width: 112px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(38, 42, 48, 0.88);
  color: #eef3f6;
  text-align: left;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
}

.status-chip-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
}

.status-chip-label {
  display: block;
  margin-top: 0.15rem;
  color: rgba(234, 241, 244, 0.68);
  font-size: 0.8rem;
}

.status-chip.status-1 {
  border-color: rgba(79, 215, 223, 0.24);
}

.status-chip.status-2 {
  border-color: rgba(240, 149, 105, 0.26);
}

.status-chip.status-3 {
  border-color: rgba(176, 212, 74, 0.26);
}

.left-rail,
.top-right-tools {
  position: absolute;
  z-index: 20;
}

.left-rail {
  top: 72px;
  left: 10px;
}

.top-right-tools {
  top: 10px;
  right: 10px;
}

.rail-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(43,43,43,0.88);
  color: white;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.north-btn {
  border-radius: 999px;
  width: 54px;
  height: 54px;
  padding: 0;
}

.north-ring {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.09), rgba(255,255,255,0.02));
}

.north-dial {
  --compass-angle: 15deg;
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(23, 26, 31, 0.88);
  transform: rotate(var(--compass-angle));
  transition: transform 0.28s ease;
}

.north-needle {
  position: absolute;
  left: 50%;
  top: 4px;
  width: 2px;
  height: 20px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffba5c 0 55%, rgba(255,255,255,0.16) 55% 100%);
  box-shadow: 0 0 14px rgba(255, 186, 92, 0.28);
}

.north-needle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -2px;
  width: 8px;
  height: 8px;
  background: #ffba5c;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  transform: translateX(-50%);
}

.north-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #f5f8fb;
}

.north-btn.is-active {
  border-color: rgba(255, 186, 92, 0.7);
  box-shadow:
    0 0 0 2px rgba(255, 186, 92, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.04);
}

.gem-btn {
  border-radius: 2px;
}

.gem-shape {
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, #9ed251, #6ca735);
  transform: rotate(45deg);
  border-radius: 2px;
  position: relative;
}

.gem-shape::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: rgba(43,43,43,0.78);
}

.plot-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
}

.plot-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 11, 14, 0.56);
  backdrop-filter: blur(14px);
}

.plot-modal-dialog {
  position: relative;
  width: min(540px, calc(100vw - 28px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(36, 40, 47, 0.74), rgba(24, 28, 34, 0.78)),
    rgba(18, 21, 26, 0.7);
  color: #eef3f6;
  backdrop-filter: blur(24px) saturate(1.1);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.plot-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 10px;
}

.plot-modal-title {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 700;
  color: #f2f4f8;
}

.plot-modal-close {
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(241, 245, 248, 0.84);
  font-size: 2rem;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.plot-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
  padding: 0 16px 18px;
}

.plot-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 16px 18px;
}

.detail-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-field span {
  font-size: 0.98rem;
  font-weight: 700;
  color: rgba(237, 242, 246, 0.84);
}

.detail-field input {
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  padding: 10px 14px;
  color: #f3f7fa;
  font-size: 0.98rem;
  backdrop-filter: blur(12px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 22px rgba(0, 0, 0, 0.12);
}

.detail-field-inline {
  display: flex;
  gap: 10px;
}

.detail-field-inline input {
  flex: 1 1 auto;
}

.detail-field-wide {
  grid-column: 1 / -1;
}

.booking-btn {
  min-width: 108px;
  border: 1px solid rgba(111, 206, 255, 0.28);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(49, 177, 255, 0.94), rgba(13, 129, 216, 0.9));
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  padding: 0 18px;
  box-shadow: 0 12px 24px rgba(14, 136, 223, 0.22);
}

.booking-btn:disabled {
  background: linear-gradient(180deg, #9dabb8, #768392);
  box-shadow: none;
}

.modal-secondary-btn,
.modal-primary-btn {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  font-size: 0.96rem;
  font-weight: 600;
  text-decoration: none;
}

.modal-secondary-btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #eff4f8;
}

.modal-primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(96, 224, 153, 0.28);
  background: linear-gradient(180deg, rgba(50, 204, 126, 0.92), rgba(29, 157, 94, 0.88));
  color: #ffffff;
  box-shadow: 0 16px 28px rgba(32, 148, 91, 0.2);
}

.modal-primary-btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.control-dock {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 20;
  width: min(330px, calc(100vw - 28px));
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.status-toggle-row {
  display: flex;
  justify-content: flex-start;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 112px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(62,62,62,0.95);
  color: var(--ink);
  font-size: 0.95rem;
}

.switch-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.switch-wrap input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-ui {
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  position: relative;
}

.switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  transition: transform 0.18s ease;
}

#statusToggle:checked + .switch-ui::after {
  transform: translateX(16px);
}

#statusToggle:checked + .switch-ui {
  background: rgba(141, 177, 78, 0.55);
}

.legend-dock {
  display: none;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: rgba(39,39,39,0.92);
}

.legend-dock.is-open {
  display: block;
}

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

.legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(77,77,77,0.45);
  color: var(--ink);
  cursor: pointer;
}

.legend-item:hover,
.legend-item.is-active {
  background: rgba(235,165,70,0.12);
  border-color: rgba(235,165,70,0.28);
}

.legend-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 999px;
}

.legend-count {
  color: rgba(255,255,255,0.55);
  font-size: 0.8rem;
}

.search-shell {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(58,58,58,0.95);
}

.search-shell input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.96rem;
}

.search-shell input::placeholder {
  color: rgba(255,255,255,0.36);
}

.search-shell button,
.search-icon {
  flex: 0 0 auto;
  color: rgba(255,255,255,0.55);
}

.search-shell button {
  border: 0;
  background: transparent;
  font-size: 1.1rem;
  line-height: 1;
}

.quick-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.circle-action {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(56,56,56,0.95);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.96rem;
}

.circle-action:disabled {
  opacity: 0.45;
}

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

.footer-pill {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(58,58,58,0.95);
  color: var(--muted);
  font-size: 0.95rem;
}

.meta-chip {
  position: absolute;
  top: 16px;
  right: 64px;
  z-index: 20;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(52,52,52,0.82);
  color: rgba(255,255,255,0.5);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
}

.hover-card {
  position: absolute;
  z-index: 30;
  min-width: 150px;
  max-width: 220px;
  padding: 0.7rem 0.8rem;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: rgba(38,38,38,0.96);
  color: var(--ink);
  pointer-events: none;
  transform: translate(14px, 14px);
}

.hover-title {
  font-weight: 700;
}

.hover-meta {
  margin-top: 0.2rem;
  color: rgba(255,255,255,0.58);
  font-size: 0.82rem;
}

@media (max-width: 900px) {
  .brand-sub,
  .meta-chip {
    display: none;
  }

  .status-strip {
    width: min(520px, calc(100vw - 32px));
  }
}

@media (max-width: 768px) {
  .layout-viewport {
    padding: 64px 8px 204px;
  }

  .plot-layer {
    width: min(1050px, calc(100vw - 16px));
    max-height: calc(100vh - 276px);
    max-height: calc(100dvh - 276px);
  }

  .brand-hud {
    top: max(6px, env(safe-area-inset-top));
    gap: 0.7rem;
    padding: 0.7rem 0.8rem;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand-title {
    font-size: 1rem;
  }

  .helper-panel {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: calc(196px + env(safe-area-inset-bottom));
    width: auto;
  }

  .status-strip {
    left: 10px;
    right: 10px;
    bottom: calc(112px + env(safe-area-inset-bottom));
    width: auto;
    gap: 8px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .status-chip {
    min-width: 104px;
    flex: 0 0 auto;
  }

  .left-rail {
    top: 64px;
    left: 8px;
  }

  .rail-btn {
    width: 38px;
    height: 38px;
  }

  .control-dock {
    right: 10px;
    left: 10px;
    width: auto;
    bottom: calc(10px + env(safe-area-inset-bottom));
  }

  .footer-pill {
    min-height: 42px;
    font-size: 0.88rem;
  }

  .circle-action {
    width: 44px;
    height: 44px;
  }

  .hover-card {
    display: none !important;
  }

  .plot-modal {
    padding: 10px;
    align-items: end;
  }

  .plot-modal-dialog {
    width: 100%;
    max-height: min(88vh, 88dvh);
    border-radius: 24px 24px 0 0;
  }

  .plot-modal-title {
    font-size: 1.55rem;
  }

  .plot-modal-grid {
    grid-template-columns: 1fr;
  }

  .plot-modal-footer {
    flex-direction: column-reverse;
  }

  .detail-field-wide {
    grid-column: auto;
  }

  .detail-field-inline {
    flex-direction: column;
  }

  .booking-btn {
    min-height: 46px;
  }

  .quick-actions {
    flex-wrap: wrap;
  }

  .modal-secondary-btn,
  .modal-primary-btn {
    width: 100%;
  }
}
