@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Oxanium:wght@400;500;600;700&family=Rajdhani:wght@500;600;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #0b111a;
  --panel: rgba(17, 27, 42, 0.86);
  --panel-strong: rgba(22, 34, 52, 0.94);
  --line: rgba(103, 215, 234, 0.28);
  --line-strong: rgba(103, 215, 234, 0.46);
  --text: #e9f2f7;
  --muted: #91a2b3;
  --cyan: #67d7ea;
  --violet: #a69bff;
  --amber: #f0bd68;
  --emerald: #72e4b8;
  --rose: #ef7894;
  --lime: #c8e978;
  --green: var(--emerald);
  --pink: var(--rose);
  --red: var(--rose);
  --surface-width: 704px;
  --surface-height: 528px;
  --tile-size: 22px;
  --chunk-w: 176px;
  --chunk-h: 176px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  font-family:
    Oxanium, Rajdhani, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    radial-gradient(circle at 18% 16%, rgba(0, 229, 255, 0.08), transparent 28rem),
    radial-gradient(circle at 82% 18%, rgba(255, 190, 77, 0.05), transparent 26rem),
    radial-gradient(circle at 54% 88%, rgba(57, 255, 176, 0.06), transparent 28rem),
    #090c10;
  color: var(--text);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  content: "";
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.035) 0,
      rgba(255, 255, 255, 0.035) 1px,
      transparent 1px,
      transparent 4px
    );
  mix-blend-mode: screen;
  opacity: 0.08;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 246px minmax(0, 1fr) 340px;
  grid-template-rows: 72px minmax(0, 1fr);
  height: 100vh;
}

.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(45, 226, 230, 0.12), transparent 36%),
    rgba(2, 8, 10, 0.9);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.brand-lockup,
.context-strip,
.sync-strip,
.section-title,
.team-summary,
.map-controls,
.map-readout,
.tool-actions {
  display: flex;
  align-items: center;
}

.brand-lockup {
  min-width: 214px;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--cyan);
  border-radius: 6px;
  color: #041011;
  background:
    linear-gradient(135deg, var(--cyan), var(--green));
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 0 24px rgba(45, 226, 230, 0.4);
}

.brand-lockup strong,
.brand-lockup span {
  display: block;
}

.brand-lockup strong {
  font-size: 15px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-lockup div > span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.context-strip {
  flex: 1;
  justify-content: center;
  gap: 10px;
}

label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

select,
input,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(145, 183, 180, 0.24);
  border-radius: 6px;
  outline: none;
  background: rgba(1, 7, 9, 0.82);
  color: var(--text);
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(45, 226, 230, 0.12);
}

.context-strip label {
  width: min(30%, 240px);
}

.context-strip select {
  height: 34px;
  margin-top: 4px;
  padding: 0 10px;
}

.sync-strip {
  justify-content: flex-end;
  min-width: 230px;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.status-pill {
  padding: 6px 8px;
  border: 1px solid rgba(123, 241, 120, 0.38);
  border-radius: 999px;
  color: var(--green);
  background: rgba(123, 241, 120, 0.08);
  text-transform: uppercase;
}

.status-pill.encrypted {
  border-color: rgba(255, 184, 107, 0.42);
  color: var(--amber);
  background: rgba(255, 184, 107, 0.08);
}

.presence-dot {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--presence-color);
  border-radius: 50%;
  color: #021010;
  background: var(--presence-color);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 0 16px color-mix(in srgb, var(--presence-color), transparent 54%);
}

.side-panel {
  min-height: 0;
  overflow: auto;
  padding: 14px;
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(45, 226, 230, 0.08), transparent 240px),
    var(--panel);
}

.left-panel {
  border-right: 1px solid var(--line);
}

.right-panel {
  border-left: 1px solid var(--line);
}

.panel-section {
  padding: 14px 0;
  border-bottom: 1px solid rgba(145, 183, 180, 0.14);
}

.panel-section:first-child {
  padding-top: 0;
}

.panel-section:last-child {
  border-bottom: 0;
}

.section-title {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.section-title h2 {
  flex: 1;
  margin: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.title-icon,
.row-icon,
.mini-icon {
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(45, 226, 230, 0.5);
  border-radius: 4px;
  color: var(--cyan);
  background: rgba(45, 226, 230, 0.08);
}

.title-icon {
  width: 22px;
  height: 22px;
  font-size: 11px;
  font-weight: 900;
}

.team-summary {
  gap: 8px;
}

.team-summary > div {
  flex: 1;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(145, 183, 180, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.team-summary span,
.team-summary strong {
  display: block;
}

.team-summary span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.team-summary strong {
  margin-top: 3px;
  color: var(--text);
  font-size: 12px;
}

.nav-row,
.palette-item,
.seg-button,
.icon-button,
.inspector-actions button {
  border: 1px solid rgba(145, 183, 180, 0.18);
  border-radius: 6px;
  background: rgba(4, 15, 17, 0.82);
  cursor: pointer;
}

.nav-row,
.palette-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 38px;
  gap: 10px;
  margin: 6px 0;
  padding: 8px 9px;
  color: var(--text);
  text-align: left;
}

.nav-row:hover,
.palette-item:hover,
.seg-button:hover,
.icon-button:hover,
.inspector-actions button:hover {
  border-color: var(--cyan);
  background: rgba(45, 226, 230, 0.11);
}

.nav-row.is-active {
  border-color: rgba(123, 241, 120, 0.48);
  background: rgba(123, 241, 120, 0.1);
}

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

.palette-item {
  position: relative;
}

.palette-item.is-muted {
  opacity: 0.42;
}

.palette-color {
  width: 10px;
  align-self: stretch;
  border-radius: 5px;
  background: var(--palette-color);
  box-shadow: 0 0 14px var(--palette-color);
}

.palette-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.palette-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.palette-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toggle-line {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 30px;
  color: var(--text);
  text-transform: none;
}

.toggle-line input {
  width: 15px;
  height: 15px;
  accent-color: var(--cyan);
}

.workspace {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background:
    linear-gradient(90deg, rgba(45, 226, 230, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(45, 226, 230, 0.06) 1px, transparent 1px),
    rgba(1, 6, 8, 0.7);
  background-size: 42px 42px;
}

.map-controls {
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 9, 11, 0.88);
}

.segmented-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 176px;
  padding: 3px;
  border: 1px solid rgba(45, 226, 230, 0.24);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
}

.seg-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.seg-button.is-active {
  border-color: var(--cyan);
  color: var(--text);
  background: rgba(45, 226, 230, 0.14);
}

.mini-icon {
  width: 18px;
  height: 18px;
  font-size: 9px;
  font-weight: 900;
}

.control-grid {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(8, minmax(76px, 1fr));
  gap: 8px;
  min-width: 0;
}

.control-grid label {
  min-width: 0;
}

.control-grid input {
  height: 32px;
  margin-top: 4px;
  padding: 0 8px;
}

.control-grid label.is-muted {
  opacity: 0.35;
}

.snap-switch {
  display: grid;
  align-content: end;
}

.snap-switch input {
  width: 34px;
  accent-color: var(--green);
}

.tool-actions {
  gap: 7px;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--cyan);
}

.icon-button span {
  font-size: 13px;
  font-weight: 900;
}

.icon-button.danger {
  color: var(--red);
}

.map-stage {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr);
  padding: 12px;
}

.ops-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 0 4px 10px;
}

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

.ops-card,
.map-legend {
  border: 1px solid rgba(0, 229, 255, 0.14);
  background: rgba(13, 18, 28, 0.72);
}

.ops-card {
  display: grid;
  min-height: 58px;
  gap: 2px;
  padding: 8px 10px;
}

.ops-card span,
.ops-card small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.ops-card strong {
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-legend {
  display: flex;
  align-items: center;
  max-width: 440px;
  gap: 9px;
  overflow: hidden;
  padding: 8px 10px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.legend-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1px solid var(--legend-color);
  background: color-mix(in srgb, var(--legend-color), transparent 70%);
}

.legend-swatch.line {
  height: 4px;
  border: 0;
  background: var(--legend-color);
}

.legend-swatch.diamond {
  transform: rotate(45deg);
}

.legend-swatch.corner {
  width: 14px;
  height: 14px;
  border: 0;
  border-top: 5px solid var(--legend-color);
  border-right: 5px solid var(--legend-color);
  background: transparent;
}

.map-readout {
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 0 4px 10px;
  color: var(--muted);
  font-size: 12px;
}

.map-readout span {
  border: 1px solid rgba(145, 183, 180, 0.16);
  border-radius: 999px;
  flex: 1;
  max-width: calc(50% - 4px);
  min-width: 0;
  overflow: hidden;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.28);
  text-overflow: ellipsis;
  white-space: nowrap;
}

#selectedReadout {
  text-align: right;
}

.map-viewport {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(45, 226, 230, 0.36);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(45, 226, 230, 0.1), transparent 42%),
    #020708;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 18px 60px rgba(0, 0, 0, 0.35);
}

.map-viewport.is-drag-over {
  border-color: var(--green);
  box-shadow:
    inset 0 0 0 1px rgba(123, 241, 120, 0.3),
    0 0 35px rgba(123, 241, 120, 0.12);
}

.map-surface {
  position: relative;
  width: var(--surface-width);
  height: var(--surface-height);
  background-color: rgba(2, 10, 12, 0.98);
  background-image:
    linear-gradient(rgba(45, 226, 230, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 226, 230, 0.13) 1px, transparent 1px),
    linear-gradient(rgba(123, 241, 120, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(123, 241, 120, 0.28) 1px, transparent 1px);
  background-size:
    var(--tile-size) var(--tile-size),
    var(--tile-size) var(--tile-size),
    var(--chunk-w) var(--chunk-h),
    var(--chunk-w) var(--chunk-h);
  background-position: -1px -1px;
}

.map-surface::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.02), transparent 18%, rgba(255, 255, 255, 0.02) 33%, transparent 60%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.025) 0, rgba(255, 255, 255, 0.025) 1px, transparent 1px, transparent 11px);
}

.entity {
  position: absolute;
  display: flex;
  min-width: 14px;
  min-height: 14px;
  align-items: flex-start;
  gap: 6px;
  padding: 6px;
  border: 1px solid color-mix(in srgb, var(--entity-color), white 12%);
  border-radius: 6px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--entity-color), transparent 78%), rgba(2, 9, 10, 0.72)),
    color-mix(in srgb, var(--entity-color), transparent 88%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 22px color-mix(in srgb, var(--entity-color), transparent 82%);
  color: var(--text);
  cursor: grab;
  user-select: none;
}

.entity:active {
  cursor: grabbing;
}

.entity.is-selected {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 28px color-mix(in srgb, var(--entity-color), transparent 55%);
}

.entity.is-linked-resource {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.entity.is-hidden-layer {
  display: none;
}

.entity-zone {
  align-items: flex-start;
  border-style: dashed;
}

.entity-road {
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
}

.entity-point,
.entity-resource {
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
}

.entity-resource {
  border-radius: 6px;
}

.entity-icon {
  display: grid;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--entity-color), white 12%);
  border-radius: 4px;
  color: #061012;
  background: var(--entity-color);
  font-size: 11px;
  font-weight: 900;
}

.entity-copy {
  min-width: 0;
  pointer-events: none;
}

.entity-copy strong,
.entity-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entity-copy strong {
  max-width: 100%;
  font-size: clamp(10px, 0.8rem, 13px);
}

.entity-copy span {
  margin-top: 2px;
  color: rgba(233, 255, 248, 0.72);
  font-size: 10px;
  text-transform: uppercase;
}

.entity-point .entity-icon,
.entity-resource .entity-icon {
  width: min(100%, 28px);
  height: min(100%, 28px);
  border-radius: inherit;
}

.entity-point .entity-copy,
.entity-resource .entity-copy {
  position: absolute;
  left: calc(100% + 6px);
  top: 50%;
  min-width: 96px;
  transform: translateY(-50%);
  padding: 5px 7px;
  border: 1px solid rgba(145, 183, 180, 0.18);
  border-radius: 6px;
  background: rgba(3, 8, 10, 0.86);
}

.resize-handle {
  position: absolute;
  z-index: 7;
  display: none;
  border: 1px solid var(--lime);
  background: rgba(200, 255, 92, 0.2);
  box-shadow: 0 0 12px rgba(200, 255, 92, 0.34);
}

.entity.is-selected .resize-handle {
  display: block;
}

.resize-n,
.resize-s {
  right: 12px;
  left: 12px;
  height: 8px;
  cursor: ns-resize;
}

.resize-e,
.resize-w {
  top: 12px;
  bottom: 12px;
  width: 8px;
  cursor: ew-resize;
}

.resize-n {
  top: -5px;
}

.resize-s {
  bottom: -5px;
}

.resize-e {
  right: -5px;
}

.resize-w {
  left: -5px;
}

.resize-ne,
.resize-nw,
.resize-se,
.resize-sw {
  width: 13px;
  height: 13px;
  background: var(--lime);
}

.resize-ne {
  top: -6px;
  right: -6px;
  cursor: nesw-resize;
}

.resize-nw {
  top: -6px;
  left: -6px;
  cursor: nwse-resize;
}

.resize-se {
  right: -6px;
  bottom: -6px;
  cursor: nwse-resize;
}

.resize-sw {
  bottom: -6px;
  left: -6px;
  cursor: nesw-resize;
}

.entity-point .resize-handle,
.entity-road .resize-handle {
  display: none;
}

.collab-cursor {
  position: absolute;
  z-index: 25;
  display: grid;
  gap: 3px;
  pointer-events: none;
  transform: translate(4px, 4px);
}

.cursor-arrow {
  width: 0;
  height: 0;
  border-top: 12px solid var(--cursor-color);
  border-right: 9px solid transparent;
  filter: drop-shadow(0 0 8px var(--cursor-color));
}

.cursor-label {
  width: max-content;
  max-width: 140px;
  overflow: hidden;
  padding: 4px 7px;
  border: 1px solid var(--cursor-color);
  border-radius: 6px;
  color: var(--text);
  background: rgba(2, 8, 10, 0.9);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-empty {
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

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

.stat-box {
  padding: 10px;
  border: 1px solid rgba(145, 183, 180, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.stat-box span,
.stat-box strong {
  display: block;
}

.stat-box span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.stat-box strong {
  margin-top: 4px;
  font-size: 18px;
}

.inspector-form {
  display: grid;
  gap: 10px;
}

.inspector-form label {
  display: grid;
  gap: 5px;
}

.inspector-form input,
.inspector-form select {
  height: 34px;
  padding: 0 9px;
}

.inspector-form textarea {
  min-height: 74px;
  resize: vertical;
  padding: 9px;
}

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

.field-row.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.color-row {
  display: grid;
  grid-template-columns: 1fr 54px;
  gap: 8px;
}

.color-row input[type="color"] {
  padding: 3px;
}

.resource-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.resource-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 184, 107, 0.34);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 184, 107, 0.09);
  font-size: 12px;
  cursor: crosshair;
}

.resource-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-chip small {
  color: var(--amber);
  font-weight: 800;
}

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

.inspector-actions button {
  min-height: 36px;
  color: var(--text);
}

.resource-index {
  display: grid;
  gap: 8px;
}

.collab-room,
.support-desk {
  display: grid;
  gap: 8px;
}

.collab-row,
.chat-message,
.support-ticket {
  padding: 9px;
  border: 1px solid rgba(145, 183, 180, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.collab-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 8px;
  align-items: center;
}

.collab-avatar {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--avatar-color);
  border-radius: 50%;
  color: #021010;
  background: var(--avatar-color);
  font-size: 12px;
  font-weight: 900;
}

.collab-copy,
.chat-copy,
.support-copy {
  min-width: 0;
}

.collab-copy strong,
.collab-copy span,
.chat-copy strong,
.chat-copy span,
.support-copy strong,
.support-copy span {
  display: block;
}

.collab-copy strong,
.chat-copy strong,
.support-copy strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collab-copy span,
.chat-copy span,
.support-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.collab-role,
.support-status {
  padding: 5px 7px;
  border: 1px solid rgba(45, 226, 230, 0.24);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(45, 226, 230, 0.08);
  font-size: 10px;
  text-transform: uppercase;
}

.chat-log {
  display: grid;
  max-height: 170px;
  overflow: auto;
  gap: 7px;
}

.chat-message {
  display: grid;
  gap: 4px;
}

.chat-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.mention {
  color: var(--amber);
  font-weight: 800;
}

.chat-form,
.support-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 8px;
}

.support-form {
  grid-template-columns: 112px 1fr auto;
}

.chat-form input,
.support-form input,
.support-form select {
  height: 34px;
  padding: 0 9px;
}

.chat-form button,
.support-form button {
  min-height: 34px;
  border: 1px solid rgba(45, 226, 230, 0.28);
  border-radius: 6px;
  background: rgba(45, 226, 230, 0.1);
  color: var(--cyan);
  cursor: pointer;
}

.support-ticket {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.resource-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(145, 183, 180, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.resource-row strong,
.resource-row span {
  display: block;
}

.resource-row strong {
  font-size: 13px;
}

.resource-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.resource-row button {
  align-self: center;
  min-width: 42px;
  min-height: 28px;
  border: 1px solid rgba(45, 226, 230, 0.28);
  border-radius: 6px;
  background: rgba(45, 226, 230, 0.08);
  color: var(--cyan);
  cursor: pointer;
}

.audit-log {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
}

.audit-log li::marker {
  color: var(--cyan);
}

@keyframes edge-flicker {
  0%,
  100% {
    box-shadow:
      inset 0 0 0 1px rgba(0, 229, 255, 0.18),
      inset 0 0 22px rgba(0, 229, 255, 0.05);
  }

  52% {
    box-shadow:
      inset 0 0 0 1px rgba(0, 229, 255, 0.44),
      inset 0 0 30px rgba(0, 229, 255, 0.12);
  }
}

@keyframes dash-flow {
  to {
    stroke-dashoffset: -32;
  }
}

@keyframes ring-pulse {
  0%,
  100% {
    outline-color: rgba(200, 255, 92, 0.64);
  }

  50% {
    outline-color: rgba(200, 255, 92, 1);
  }
}

@keyframes scan-sweep {
  to {
    background-position:
      0 0,
      0 0,
      0 0,
      240% 0;
  }
}

.topbar,
.side-panel,
.map-controls,
.map-viewport,
.panel-section {
  backdrop-filter: blur(14px);
}

.topbar,
.side-panel,
.map-controls {
  background: var(--panel);
}

.panel-section {
  position: relative;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(0, 229, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(0, 229, 255, 0.025), transparent 34%),
    rgba(20, 24, 41, 0.62);
}

.panel-section::before,
.panel-section::after {
  position: absolute;
  width: 16px;
  height: 16px;
  pointer-events: none;
  content: "";
}

.panel-section::before {
  top: -1px;
  left: -1px;
  border-top: 1px solid rgba(0, 229, 255, 0.5);
  border-left: 1px solid rgba(0, 229, 255, 0.5);
}

.panel-section::after {
  right: -1px;
  bottom: -1px;
  border-right: 1px solid rgba(0, 229, 255, 0.5);
  border-bottom: 1px solid rgba(0, 229, 255, 0.5);
}

.brand-mark,
.nav-row,
.palette-item,
.seg-button,
.tool-mode,
.icon-button,
.hud-button,
.inspector-actions button,
.stat-box,
.team-summary > div,
.collab-row,
.chat-message,
.support-ticket,
.resource-row,
.resource-metric,
select,
input,
textarea {
  border-radius: 0;
}

.section-title h2,
.brand-lockup strong,
.map-readout,
.telemetry-pill,
label {
  font-family:
    "Barlow Condensed", Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
}

.map-controls {
  position: relative;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  box-shadow:
    inset 0 -1px 0 rgba(0, 229, 255, 0.18),
    0 12px 24px rgba(0, 0, 0, 0.28);
}

.view-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(82px, 1fr));
  min-width: 350px;
  border: 1px solid rgba(0, 229, 255, 0.18);
  background: rgba(9, 12, 16, 0.54);
}

.view-tab {
  min-height: 36px;
  border: 0;
  border-right: 1px solid rgba(0, 229, 255, 0.14);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.view-tab:last-child {
  border-right: 0;
}

.view-tab.is-active {
  color: #061012;
  background: var(--cyan);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.2);
}

.search-rig {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  min-width: 240px;
  max-width: 360px;
  border: 1px solid rgba(0, 229, 255, 0.2);
  background: rgba(9, 12, 16, 0.64);
}

.search-rig input {
  height: 36px;
  border: 0;
  background: transparent;
  padding: 0 10px;
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.search-rig .hud-button {
  border-width: 0 0 0 1px;
}

.saved-views {
  display: grid;
  grid-template-columns: repeat(3, minmax(74px, 1fr));
  border: 1px solid rgba(142, 121, 255, 0.22);
  background: rgba(9, 12, 16, 0.5);
}

.saved-view {
  min-height: 36px;
  border: 0;
  border-right: 1px solid rgba(142, 121, 255, 0.14);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.saved-view:last-child {
  border-right: 0;
}

.saved-view.is-active {
  color: var(--violet);
  background: rgba(142, 121, 255, 0.14);
  box-shadow: inset 0 0 18px rgba(142, 121, 255, 0.08);
}

.mode-cluster {
  display: grid;
  grid-template-columns: repeat(2, minmax(76px, 1fr));
  gap: 6px;
}

.tool-mode,
.hud-button {
  min-height: 36px;
  border: 1px solid rgba(0, 229, 255, 0.28);
  background: rgba(9, 12, 16, 0.74);
  color: var(--muted);
  cursor: pointer;
  text-transform: uppercase;
}

.tool-mode {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  font-size: 12px;
}

.tool-mode.is-active,
.hud-button:hover,
.tool-mode:hover {
  border-color: var(--cyan);
  color: var(--text);
  background: rgba(0, 229, 255, 0.12);
  box-shadow: inset 0 0 18px rgba(0, 229, 255, 0.08);
}

.road-width-control {
  width: 92px;
}

.road-width-control input {
  height: 34px;
  margin-top: 3px;
  padding: 0 8px;
  color: var(--amber);
}

.zoom-rig {
  display: grid;
  grid-template-columns: 32px minmax(76px, 110px) 32px 48px 58px 48px;
  align-items: center;
  gap: 5px;
}

.zoom-rig input[type="range"] {
  accent-color: var(--cyan);
}

.hud-button {
  padding: 0 10px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
}

.telemetry-pill,
.map-readout span {
  border: 1px solid rgba(0, 229, 255, 0.28);
  background: rgba(9, 12, 16, 0.72);
  color: var(--muted);
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.snap-switch {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 36px;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid rgba(57, 255, 176, 0.32);
  color: var(--emerald);
  background: rgba(57, 255, 176, 0.08);
}

.map-setup {
  position: relative;
}

.map-setup summary {
  display: grid;
  min-width: 64px;
  min-height: 36px;
  place-items: center;
  padding: 0 12px;
  border: 1px solid rgba(0, 229, 255, 0.28);
  color: var(--cyan);
  background: rgba(9, 12, 16, 0.74);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.map-controls .tool-actions {
  display: none;
}

.map-setup-inner {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  display: grid;
  width: min(720px, calc(100vw - 320px));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(20, 24, 41, 0.96);
  box-shadow:
    inset 0 0 24px rgba(0, 229, 255, 0.08),
    0 22px 70px rgba(0, 0, 0, 0.4);
}

.control-grid {
  grid-template-columns: repeat(4, minmax(94px, 1fr));
}

.map-readout {
  grid-template-columns: 1fr 1fr 1fr;
}

.map-readout span {
  border-radius: 0;
  max-width: calc(33.333% - 6px);
}

.map-viewport {
  border-color: rgba(0, 229, 255, 0.54);
  border-radius: 0;
  background: #05080d;
  box-shadow:
    inset 0 0 32px rgba(0, 229, 255, 0.09),
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 22px 70px rgba(0, 0, 0, 0.42);
}

.workspace-status {
  display: grid;
  grid-template-columns: minmax(92px, auto) minmax(86px, auto) minmax(140px, 1fr) minmax(150px, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 7px 12px;
  border-top: 1px solid rgba(0, 229, 255, 0.28);
  background:
    linear-gradient(90deg, rgba(0, 229, 255, 0.07), transparent 32%),
    rgba(9, 12, 16, 0.86);
  color: var(--muted);
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

.workspace-status span {
  min-width: 0;
  overflow: hidden;
  padding: 6px 8px;
  border: 1px solid rgba(0, 229, 255, 0.14);
  background: rgba(0, 0, 0, 0.18);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-status button {
  min-width: 58px;
  min-height: 28px;
  border: 1px solid rgba(0, 229, 255, 0.26);
  background: rgba(0, 229, 255, 0.08);
  color: var(--cyan);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.workspace-status button:disabled {
  border-color: rgba(145, 183, 180, 0.12);
  color: rgba(158, 171, 198, 0.48);
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.025);
}

.map-surface {
  isolation: isolate;
  background:
    linear-gradient(132deg, rgba(255, 190, 77, 0.06), transparent 38%),
    linear-gradient(42deg, rgba(0, 229, 255, 0.07), transparent 44%),
    linear-gradient(180deg, #111824 0%, #090d14 52%, #0d1420 100%);
  cursor: crosshair;
}

.map-surface::before {
  z-index: 0;
  background:
    linear-gradient(115deg, transparent 0 16%, rgba(57, 255, 176, 0.035) 16% 18%, transparent 18% 44%, rgba(255, 190, 77, 0.03) 44% 47%, transparent 47%),
    linear-gradient(64deg, transparent 0 28%, rgba(142, 121, 255, 0.04) 28% 31%, transparent 31% 72%, rgba(57, 255, 176, 0.03) 72% 75%, transparent 75%);
  filter: saturate(1.05);
}

.map-surface::after {
  position: absolute;
  inset: 0;
  z-index: 14;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(0, 229, 255, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.22) 1px, transparent 1px);
  background-size:
    var(--tile-size) var(--tile-size),
    var(--tile-size) var(--tile-size),
    var(--chunk-w) var(--chunk-h),
    var(--chunk-w) var(--chunk-h);
  background-position:
    0 0,
    0 0,
    0 0,
    0 0;
}

.road-layer,
.road-draft-layer,
.connection-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  overflow: visible;
  pointer-events: none;
}

.road-path {
  cursor: pointer;
  filter:
    drop-shadow(0 0 5px rgba(255, 190, 77, 0.88))
    drop-shadow(0 0 18px rgba(255, 190, 77, 0.34));
  opacity: 0.88;
  pointer-events: stroke;
}

.road-path.is-selected {
  filter:
    drop-shadow(0 0 5px rgba(0, 229, 255, 0.9))
    drop-shadow(0 0 22px rgba(0, 229, 255, 0.42));
  opacity: 1;
}

.map-surface.is-road-mode .entity,
.map-surface.is-road-mode .road-path {
  pointer-events: none;
}

.map-surface.is-road-mode {
  cursor: crosshair;
}

.road-draft-layer {
  z-index: 15;
}

.road-draft-path {
  stroke: var(--cyan);
  stroke-dasharray: 6 10;
  filter: drop-shadow(0 0 14px rgba(0, 229, 255, 0.62));
  opacity: 0.84;
  animation: dash-flow 2.8s linear infinite;
}

.connection-layer {
  z-index: 18;
}

.resource-link {
  stroke: var(--lime);
  stroke-width: 2;
  stroke-dasharray: 6 10;
  opacity: 0.55;
  filter: drop-shadow(0 0 8px rgba(200, 255, 92, 0.36));
  animation: dash-flow 2.8s linear infinite;
}

.entity {
  z-index: 20;
  border-radius: 0;
  color: var(--text);
  overflow: visible;
}

.entity-zone {
  z-index: 3;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--entity-color), transparent 86%), transparent),
    color-mix(in srgb, var(--entity-color), transparent 92%);
}

.entity-building,
.entity-storage {
  z-index: 22;
}

.entity-point,
.entity-resource {
  z-index: 24;
  width: 34px;
  height: 34px;
  border-radius: 0;
  color: var(--entity-color);
  background: rgba(9, 12, 16, 0.88);
}

.entity-point::after,
.entity-resource::after {
  position: absolute;
  inset: 8px;
  border: 1px solid currentColor;
  content: "";
  transform: rotate(45deg);
  box-shadow: 0 0 14px currentColor;
}

.entity-point .entity-icon,
.entity-resource .entity-icon {
  position: relative;
  z-index: 1;
  color: var(--entity-color);
  background: transparent;
}

.entity.is-selected {
  outline-color: var(--lime);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 22px rgba(200, 255, 92, 0.28);
}

.entity.is-linked-resource,
.entity.is-active-resource {
  outline-color: var(--lime);
  box-shadow: 0 0 24px rgba(200, 255, 92, 0.32);
}

.mode-rank-muted {
  opacity: 0.34;
  filter: grayscale(0.35);
}

.mode-rank-primary {
  opacity: 1;
}

.status-corner {
  position: absolute;
  top: -1px;
  right: -1px;
  z-index: 3;
  padding: 3px 5px;
  border-left: 1px solid var(--status-color);
  border-bottom: 1px solid var(--status-color);
  color: var(--status-color);
  background: rgba(9, 12, 16, 0.88);
  font-size: 9px;
  font-weight: 900;
}

.assignee-avatar {
  position: absolute;
  right: -10px;
  bottom: -10px;
  z-index: 4;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--status-color);
  border-radius: 50%;
  color: #061012;
  background: var(--status-color);
  font-size: 10px;
  font-weight: 900;
}

.entity-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.mini-badge {
  display: inline-flex;
  max-width: 100%;
  min-height: 18px;
  align-items: center;
  padding: 2px 5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(9, 12, 16, 0.68);
  color: var(--text);
  font-size: 9px;
  line-height: 1;
  text-transform: none;
}

.entity:not(.is-selected) .status-badge,
.entity:not(.is-selected) .owner-badge,
.entity:not(.is-selected) .priority-badge {
  display: none;
}

body[data-current-view="Tasks"] .entity .status-badge,
body[data-current-view="Tasks"] .entity .priority-badge,
body[data-current-view="Team"] .entity .owner-badge {
  display: inline-flex;
}

.entity:not(.is-selected) .entity-badges {
  max-width: 110px;
}

.status-badge {
  border-color: var(--badge-color);
  color: var(--badge-color);
}

.resource-badge {
  border-color: rgba(255, 190, 77, 0.45);
  color: var(--amber);
}

.owner-badge {
  border-color: rgba(0, 229, 255, 0.32);
  color: var(--cyan);
}

.priority-badge {
  border-color: rgba(255, 92, 138, 0.36);
  color: var(--rose);
}

.resize-handle {
  border-color: var(--cyan);
  border-radius: 0;
  background: rgba(0, 229, 255, 0.1);
  box-shadow: none;
}

.resize-ne,
.resize-nw,
.resize-se,
.resize-sw {
  background: var(--cyan);
}

.collab-cursor {
  z-index: 30;
}

.resource-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.resource-trace {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.trace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(200, 255, 92, 0.24);
  background: rgba(200, 255, 92, 0.055);
}

.trace-header span,
.trace-column > span,
.trace-none {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.trace-header strong {
  color: var(--lime);
}

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

.trace-column {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
}

.trace-column button,
.task-row {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(0, 229, 255, 0.14);
  background: rgba(9, 12, 16, 0.52);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.trace-column button {
  display: grid;
  gap: 2px;
  min-height: 44px;
  padding: 7px;
}

.trace-column button strong,
.trace-column button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trace-column button strong {
  font-size: 11px;
}

.trace-column button span {
  color: var(--muted);
  font-size: 10px;
}

.task-queue {
  display: grid;
  gap: 7px;
}

.task-row {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 62px;
  padding: 8px;
  border-left: 3px solid var(--status-color);
}

.task-status {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--status-color);
  color: var(--status-color);
  font-size: 10px;
  font-weight: 900;
}

.task-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.task-copy strong,
.task-copy span,
.task-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-copy strong {
  font-size: 13px;
}

.task-copy span,
.task-copy small {
  color: var(--muted);
  font-size: 11px;
}

.resource-metric {
  display: grid;
  min-height: 66px;
  gap: 4px;
  padding: 10px;
  border: 1px solid currentColor;
  background: rgba(9, 12, 16, 0.62);
  color: var(--cyan);
  cursor: pointer;
  text-align: left;
}

.resource-metric span {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.resource-metric strong {
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 22px;
}

.resource-metric.emerald {
  color: var(--emerald);
}

.resource-metric.violet {
  color: var(--violet);
}

.resource-metric.rose {
  color: var(--rose);
}

.resource-metric.amber {
  color: var(--amber);
}

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

.resource-row.is-active {
  border-color: rgba(200, 255, 92, 0.46);
  background: rgba(200, 255, 92, 0.07);
}

.resource-glyph {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--emerald);
  color: var(--emerald);
  background: rgba(57, 255, 176, 0.08);
  font-weight: 900;
  text-transform: uppercase;
}

.secondary-section {
  padding: 0;
}

.secondary-section > summary {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.secondary-section[open] {
  padding-bottom: 12px;
}

.secondary-section[open] > summary {
  color: var(--text);
}

.secondary-section > :not(summary) {
  margin: 0 12px;
}

/* Tactical sector scanner visual system */
body {
  background:
    radial-gradient(circle at 18% 12%, rgba(0, 229, 255, 0.07), transparent 32rem),
    radial-gradient(circle at 72% 90%, rgba(255, 190, 77, 0.035), transparent 28rem),
    #07111c;
}

body::after {
  opacity: 0.045;
}

.app-shell {
  grid-template-columns: 52px 244px minmax(680px, 1fr) 360px;
  grid-template-rows: 76px minmax(0, 1fr);
  gap: 0;
}

.topbar {
  min-width: 0;
  padding: 10px 16px;
  border-bottom-color: rgba(0, 229, 255, 0.38);
  background:
    linear-gradient(90deg, rgba(0, 229, 255, 0.075), transparent 48%),
    #081321;
  box-shadow: inset 0 -1px 0 rgba(0, 229, 255, 0.18);
}

.topbar::before {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(0, 229, 255, 0.62);
  color: #06121c;
  background: var(--cyan);
  content: "04";
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 900;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-color: rgba(0, 229, 255, 0.72);
  background: rgba(0, 229, 255, 0.18);
  color: var(--cyan);
  box-shadow: none;
}

.brand-lockup {
  min-width: 190px;
}

.brand-lockup strong {
  color: var(--text);
  font-size: 16px;
  letter-spacing: 0.08em;
}

.brand-lockup div > span,
.context-strip label,
.section-title h2,
.map-readout,
.telemetry-pill,
label,
.workspace-status,
.nav-row,
.palette-copy,
.task-copy,
.resource-row {
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.context-strip {
  gap: 14px;
}

.context-strip label {
  position: relative;
  width: min(31%, 260px);
  color: #7f90ad;
  font-size: 10px;
}

.context-strip select {
  height: 36px;
  margin-top: 4px;
  border-color: rgba(93, 132, 166, 0.54);
  background: #07101b;
  color: var(--text);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-pill,
.presence-dot,
.collab-avatar {
  border-radius: 0;
  box-shadow: none;
}

.status-pill {
  border-color: rgba(57, 255, 176, 0.36);
  background: rgba(57, 255, 176, 0.06);
  color: var(--emerald);
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

.icon-rail {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  padding: 14px 8px;
  border-right: 1px solid rgba(0, 229, 255, 0.22);
  background: #07101a;
}

.rail-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(93, 132, 166, 0.44);
  background: rgba(9, 20, 34, 0.86);
  color: var(--muted);
  cursor: pointer;
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 900;
}

.rail-button.is-active,
.rail-button:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.12);
}

.left-panel {
  grid-column: 2;
  grid-row: 2;
}

.workspace {
  grid-column: 3;
  grid-row: 2;
  background:
    linear-gradient(90deg, rgba(0, 229, 255, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px),
    #07101a;
  background-size: 32px 32px;
}

.right-panel {
  grid-column: 4;
  grid-row: 2;
}

.side-panel,
.map-controls,
.panel-section,
.map-viewport,
.workspace-status,
.ops-card,
.map-legend,
.stat-box,
.team-summary > div,
.resource-row,
.task-row,
.trace-column button,
.resource-metric,
.collab-row,
.chat-message,
.support-ticket {
  border-radius: 0;
  box-shadow: none;
}

.side-panel {
  padding: 12px;
  border-color: rgba(0, 229, 255, 0.24);
  background:
    linear-gradient(180deg, rgba(0, 229, 255, 0.035), transparent 220px),
    rgba(8, 18, 31, 0.96);
}

.panel-section {
  margin-bottom: 10px;
  border-color: rgba(0, 229, 255, 0.2);
  background: rgba(8, 18, 31, 0.66);
}

.panel-section::before,
.panel-section::after {
  width: 10px;
  height: 10px;
  border-color: rgba(0, 229, 255, 0.38);
}

.section-title {
  justify-content: flex-start;
  gap: 8px;
}

.section-title h2 {
  color: #dcefff;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.title-icon {
  width: 24px;
  height: 24px;
  border-color: rgba(0, 229, 255, 0.58);
  background: rgba(0, 229, 255, 0.14);
  color: var(--cyan);
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.nav-row,
.palette-item,
.toggle-line {
  min-height: 38px;
  border-color: rgba(93, 132, 166, 0.26);
  background: rgba(4, 12, 21, 0.78);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.nav-row.is-active {
  border-color: rgba(57, 255, 176, 0.54);
  background: rgba(57, 255, 176, 0.09);
}

.layer-add {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--palette-color), white 18%);
  color: var(--cyan);
  cursor: pointer;
}

.icon-svg {
  width: 19px;
  height: 19px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.layer-visible {
  display: grid;
  flex: 0 0 auto;
  margin-left: auto;
  place-items: center;
  color: var(--muted);
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.layer-visible input {
  position: absolute;
  opacity: 0;
}

.layer-visible span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.layer-visible input:checked + span {
  color: inherit;
}

.layer-card .palette-color {
  width: 4px;
  border-radius: 0;
  box-shadow: none;
}

.palette-copy strong {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.palette-copy span {
  font-size: 10px;
  text-transform: uppercase;
}

.toggle-line {
  padding: 0 8px;
}

.toggle-line input {
  accent-color: var(--cyan);
}

.mini-map-module {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(93, 132, 166, 0.2);
}

.mini-map-title {
  color: var(--muted);
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mini-map {
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(0, 229, 255, 0.24);
  background:
    linear-gradient(rgba(0, 229, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.07) 1px, transparent 1px),
    rgba(2, 10, 18, 0.78);
  background-size: 12px 12px;
}

.mini-map svg {
  display: block;
  width: 100%;
  height: 100%;
}

.mini-map-viewport {
  filter: drop-shadow(0 0 3px rgba(0, 229, 255, 0.75));
}

.map-controls {
  display: flex;
  padding: 10px 12px;
  gap: 8px;
  border-bottom-color: rgba(0, 229, 255, 0.28);
  background: rgba(8, 18, 31, 0.96);
}

.control-heading {
  display: flex;
  align-items: center;
  flex: 1 0 100%;
  gap: 10px;
  min-height: 30px;
}

.control-heading strong,
.sector-map-title strong {
  display: block;
  color: var(--text);
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.control-heading span:not(.title-icon),
.sector-map-title span:not(.title-icon) {
  color: var(--muted);
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.view-tabs {
  min-width: 300px;
}

.view-tab,
.saved-view,
.tool-mode,
.hud-button,
.map-setup summary {
  letter-spacing: 0.08em;
}

.view-tab.is-active {
  background: rgba(0, 229, 255, 0.16);
  color: var(--cyan);
  box-shadow: inset 0 -2px 0 var(--cyan);
}

.saved-view.is-active {
  color: var(--violet);
  box-shadow: inset 0 -2px 0 var(--violet);
}

.snap-switch {
  border-color: rgba(57, 255, 176, 0.28);
  background: rgba(57, 255, 176, 0.055);
  color: var(--emerald);
}

.map-stage {
  grid-template-rows: auto auto auto minmax(0, 1fr);
  padding: 10px;
}

.sector-map-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  padding: 0 4px 8px;
}

.sector-map-title .title-icon {
  flex: 0 0 auto;
}

.ops-strip {
  grid-template-columns: minmax(0, 1fr);
  padding-bottom: 8px;
}

.ops-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ops-card,
.map-legend {
  border-color: rgba(93, 132, 166, 0.24);
  background: rgba(7, 16, 28, 0.72);
}

.ops-card {
  min-height: 56px;
  border-left: 2px solid rgba(0, 229, 255, 0.46);
}

.ops-card strong {
  color: var(--text);
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 18px;
  text-transform: uppercase;
}

.ops-card.grid-state strong {
  color: var(--emerald);
}

.map-readout {
  padding-bottom: 8px;
}

.map-legend {
  max-width: none;
}

.map-readout span,
.workspace-status span {
  border-color: rgba(93, 132, 166, 0.24);
  background: rgba(2, 8, 15, 0.78);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.map-viewport {
  border-color: rgba(0, 229, 255, 0.38);
  background: #020a12;
}

.map-surface {
  background:
    linear-gradient(180deg, rgba(8, 24, 38, 0.96), rgba(5, 14, 24, 0.98)),
    #05101b;
}

.map-surface::before {
  z-index: 0;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0, rgba(255, 255, 255, 0.025) 1px, transparent 1px, transparent 4px);
  filter: none;
}

.map-surface::after {
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.105) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.105) 1px, transparent 1px),
    linear-gradient(rgba(0, 229, 255, 0.32) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.32) 1px, transparent 1px);
}

.map-perimeter {
  position: absolute;
  inset: 0 auto auto 0;
  z-index: 13;
  pointer-events: none;
  border: 1px solid rgba(0, 229, 255, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(0, 229, 255, 0.14),
    inset 0 0 34px rgba(0, 229, 255, 0.045);
}

.grid-label {
  position: absolute;
  z-index: 19;
  pointer-events: none;
  color: rgba(190, 225, 245, 0.72);
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  line-height: 1;
  text-shadow: 0 1px 2px #000;
}

.grid-label-col {
  top: 5px;
  transform: translateX(6px);
}

.grid-label-row {
  left: 6px;
  transform: translateY(6px);
}

.sector-ghost {
  position: absolute;
  right: 26px;
  bottom: 22px;
  z-index: 1;
  pointer-events: none;
  color: rgba(170, 210, 235, 0.12);
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(74px, 18vw, 150px);
  font-weight: 900;
  line-height: 1;
}

.selection-callout {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 30;
  display: grid;
  min-width: 168px;
  transform: translate(-50%, -50%);
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 229, 255, 0.34);
  background: rgba(2, 8, 15, 0.72);
  color: var(--text);
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  pointer-events: none;
  text-align: center;
  text-transform: uppercase;
}

.selection-callout strong {
  color: var(--cyan);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.selection-callout span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.road-path {
  filter: drop-shadow(0 0 4px rgba(255, 190, 77, 0.36));
  opacity: 0.58;
}

.road-path.is-selected {
  filter:
    drop-shadow(0 0 4px rgba(0, 229, 255, 0.8))
    drop-shadow(0 0 12px rgba(0, 229, 255, 0.36));
}

.road-node {
  fill: #07101a;
  stroke: var(--amber);
  stroke-width: 2;
  filter: drop-shadow(0 0 5px rgba(255, 190, 77, 0.4));
}

.road-node.is-selected {
  stroke: var(--cyan);
}

.entity {
  border-color: color-mix(in srgb, var(--entity-color), white 8%);
  background: rgba(4, 12, 20, 0.74);
  box-shadow: none;
}

.entity::before {
  position: absolute;
  inset: -1px;
  pointer-events: none;
  border: 1px solid transparent;
  content: "";
}

.entity.is-selected::before {
  border-color: var(--cyan);
  clip-path: polygon(0 0, 18px 0, 18px 2px, 2px 2px, 2px 18px, 0 18px, 0 0, 100% 0, calc(100% - 18px) 0, calc(100% - 18px) 2px, calc(100% - 2px) 2px, calc(100% - 2px) 18px, 100% 18px, 100% 0, 100% 100%, calc(100% - 18px) 100%, calc(100% - 18px) calc(100% - 2px), calc(100% - 2px) calc(100% - 2px), calc(100% - 2px) calc(100% - 18px), 100% calc(100% - 18px), 100% 100%, 0 100%, 18px 100%, 18px calc(100% - 2px), 2px calc(100% - 2px), 2px calc(100% - 18px), 0 calc(100% - 18px));
}

.entity-zone {
  border-style: dashed;
  background: color-mix(in srgb, var(--entity-color), transparent 90%);
}

.entity-building,
.entity-storage,
.entity-resource {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--entity-color), transparent 88%), transparent),
    rgba(4, 12, 20, 0.82);
}

.entity.status-blocked {
  border-color: var(--rose);
  box-shadow: inset 0 0 0 1px rgba(255, 92, 138, 0.24);
}

.entity-icon {
  width: 26px;
  height: 26px;
  border-color: var(--entity-color);
  color: var(--entity-color);
  background: rgba(0, 0, 0, 0.24);
  font-size: 10px;
}

.entity-copy strong {
  color: var(--text);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.entity-copy span {
  color: rgba(211, 230, 247, 0.72);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.status-corner {
  border-color: var(--status-color);
  background: #07101a;
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.assignee-avatar {
  border-radius: 50%;
  color: var(--status-color);
  background: #07101a;
}

.mini-badge,
.resource-chip,
.collab-role,
.support-status {
  border-radius: 0;
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.right-panel {
  background:
    linear-gradient(180deg, rgba(0, 229, 255, 0.045), transparent 260px),
    rgba(8, 18, 31, 0.98);
}

.inspection-report {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.inspection-header {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(93, 132, 166, 0.26);
  background: rgba(2, 8, 15, 0.68);
}

.inspection-header span,
.inspection-header small,
.sector-health span,
.requirement-row small {
  color: var(--muted);
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.inspection-header strong {
  color: var(--text);
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  letter-spacing: 0.08em;
}

.sector-health {
  display: grid;
  grid-template-columns: 1fr 96px auto;
  align-items: center;
  gap: 8px;
}

.health-bar {
  height: 8px;
  border: 1px solid rgba(93, 132, 166, 0.28);
  background: rgba(255, 255, 255, 0.045);
}

.health-bar span {
  display: block;
  width: var(--health);
  height: 100%;
  background: linear-gradient(90deg, var(--emerald), var(--lime));
}

.sector-health strong {
  color: var(--emerald);
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.blocker-stack {
  display: grid;
  gap: 6px;
}

.blocker-stack span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 92, 138, 0.34);
  background: rgba(255, 92, 138, 0.06);
  color: var(--text);
  font-size: 11px;
}

.blocker-stack strong {
  color: var(--rose);
}

.blocker-stack.clear span {
  border-color: rgba(57, 255, 176, 0.28);
  background: rgba(57, 255, 176, 0.055);
}

.blocker-stack.clear strong {
  color: var(--emerald);
}

.requirement-table {
  display: grid;
  border: 1px solid rgba(93, 132, 166, 0.24);
}

.requirement-row {
  display: grid;
  grid-template-columns: 1fr auto 42px;
  gap: 8px;
  align-items: center;
  min-height: 30px;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(93, 132, 166, 0.18);
  color: var(--text);
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

.requirement-row:last-child {
  border-bottom: 0;
}

.requirement-row strong {
  color: var(--text);
}

.requirement-row.is-clear small {
  color: var(--emerald);
}

.requirement-row.is-short small {
  color: var(--rose);
}

.inspector-form {
  gap: 9px;
}

.inspector-form label {
  color: #7f90ad;
  letter-spacing: 0.08em;
}

.inspector-actions button {
  border-color: rgba(57, 255, 176, 0.34);
  color: var(--emerald);
  background: rgba(57, 255, 176, 0.055);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.inspector-actions button[data-action="delete"] {
  border-color: rgba(255, 92, 138, 0.52);
  color: var(--rose);
  background: rgba(255, 92, 138, 0.055);
}

.resource-board {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.resource-metric {
  min-height: 54px;
  padding: 8px;
}

.resource-metric strong {
  font-size: 18px;
}

.trace-header {
  border-color: rgba(57, 255, 176, 0.24);
  background: rgba(57, 255, 176, 0.04);
}

.resource-row {
  border-left: 2px solid var(--emerald);
}

.resource-glyph {
  border-radius: 0;
}

.task-row {
  border-color: rgba(93, 132, 166, 0.22);
  background: rgba(2, 8, 15, 0.62);
}

.task-status {
  background: rgba(0, 0, 0, 0.24);
}

.workspace-status {
  position: absolute;
  right: 16px;
  bottom: 14px;
  left: 16px;
  z-index: 34;
  display: flex;
  min-height: 0;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(0, 229, 255, 0.24);
  background: rgba(2, 8, 15, 0.72);
  backdrop-filter: blur(10px);
  pointer-events: none;
}

.workspace-status span,
.workspace-status button {
  pointer-events: auto;
}

.workspace-status span {
  flex: 1 1 0;
  min-width: 0;
  padding: 5px 8px;
}

.workspace-status button {
  flex: 0 0 86px;
  min-height: 28px;
  padding: 0 8px;
}

#historyReadout {
  display: none;
}

/* Reduced persistent chrome + stronger operational hierarchy */
.app-shell {
  grid-template-columns: 210px minmax(760px, 1fr) 320px;
  grid-template-rows: 58px minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
}

.topbar {
  border: 1px solid rgba(0, 229, 255, 0.22);
  border-radius: 8px;
  grid-column: 1 / -1;
  gap: 12px;
  padding: 6px 10px;
}

.topbar::before {
  display: none;
}

.brand-lockup {
  min-width: 160px;
  gap: 8px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

.brand-lockup strong {
  font-size: 14px;
}

.brand-lockup div > span {
  font-size: 10px;
}

.context-strip {
  gap: 8px;
}

.context-strip label {
  width: min(31%, 220px);
  font-size: 9px;
}

.context-strip select {
  height: 30px;
  border-radius: 7px;
  font-size: 11px;
}

.sync-strip {
  flex: 0 0 auto;
  min-width: 0;
  gap: 5px;
}

.presence-dot {
  width: 23px;
  height: 23px;
  border-radius: 7px;
  font-size: 11px;
}

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

.icon-rail {
  display: none;
}

.left-panel {
  grid-column: 1;
  grid-row: 2;
  padding: 10px;
}

.workspace {
  grid-column: 2;
  grid-row: 2;
  position: relative;
  grid-template-rows: auto minmax(0, 1fr);
}

.right-panel {
  grid-column: 3;
  grid-row: 2;
}

.side-panel,
.map-controls,
.panel-section,
.map-viewport,
.workspace-status,
.ops-card,
.map-legend,
.stat-box,
.team-summary > div,
.resource-row,
.task-row,
.trace-column button,
.resource-metric,
.collab-row,
.chat-message,
.support-ticket,
.inspection-header,
.inspection-meta span,
.notes-preview,
.edit-details {
  border-radius: 8px;
}

.panel-section {
  margin-bottom: 8px;
  padding: 10px;
}

.control-heading,
.saved-views,
.ops-strip {
  display: none;
}

.map-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
}

.control-row {
  display: contents;
}

.view-tabs {
  flex: 0 0 228px;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.view-tab,
.tool-mode,
.hud-button,
.map-setup summary {
  min-height: 32px;
  font-size: 11px;
}

.view-tab::before,
.hud-button::before,
.map-setup summary::before {
  content: none;
  margin-right: 0;
}

.search-rig input {
  height: 32px;
}

.search-rig {
  flex: 1 1 180px;
  min-width: 150px;
  max-width: 260px;
}

.zoom-rig {
  grid-template-columns: 28px minmax(58px, 86px) 28px 40px 44px;
  flex: 0 1 230px;
}

.road-width-control {
  width: 76px;
}

body[data-tool-mode="select"] .road-width-control {
  display: none;
}

.road-width-control input {
  height: 30px;
}

.snap-switch {
  min-height: 32px;
  padding: 0 8px;
}

.map-stage {
  grid-template-rows: auto auto minmax(0, 1fr);
  padding: 8px;
}

.sector-map-title {
  min-height: 28px;
  padding-bottom: 6px;
}

.ops-strip {
  gap: 6px;
}

.ops-summary {
  gap: 6px;
}

.ops-card {
  min-height: 48px;
  padding: 6px 8px;
}

.ops-card strong {
  font-size: 15px;
}

.map-legend {
  min-height: 30px;
  padding: 6px 8px;
}

.map-readout {
  min-height: 28px;
  padding-bottom: 6px;
}

.map-readout span {
  padding: 5px 8px;
}

.entity,
.road-path,
.road-node {
  transition:
    opacity 120ms ease,
    filter 120ms ease,
    border-color 120ms ease;
}

.entity {
  opacity: 0.38;
  filter: saturate(0.68);
}

.entity.status-planned,
.entity.status-completed,
.entity.status-stocked {
  opacity: 0.42;
}

.entity.status-in-progress,
.entity.status-active,
.entity.is-active-resource,
.entity.is-linked-resource {
  opacity: 0.72;
  filter: saturate(0.9);
}

.entity.status-blocked {
  z-index: 31;
  opacity: 0.9;
  filter: none;
  border-color: var(--rose);
}

.entity.is-selected {
  z-index: 42;
  opacity: 1;
  filter: none;
  outline-color: var(--cyan);
  box-shadow:
    inset 0 0 0 1px rgba(0, 229, 255, 0.25),
    0 0 24px rgba(0, 229, 255, 0.3);
}

.entity.is-selected::before {
  inset: -5px;
  border-width: 2px;
  filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.42));
}

.map-surface.has-no-selection .entity:not(.status-blocked) {
  opacity: 0.3;
}

.entity:not(.is-selected) .entity-copy > span,
.entity:not(.is-selected) .entity-badges,
.entity:not(.is-selected) .owner-badge,
.entity:not(.is-selected) .priority-badge,
.entity:not(.is-selected) .assignee-avatar {
  display: none;
}

.entity:not(.is-selected):not(.status-blocked):not(.status-in-progress):not(.status-active) .entity-copy {
  display: none;
}

.entity:not(.is-selected).status-blocked .entity-copy strong,
.entity:not(.is-selected).status-in-progress .entity-copy strong,
.entity:not(.is-selected).status-active .entity-copy strong {
  max-width: 110px;
  font-size: 10px;
}

.entity:not(.is-selected) {
  padding: 4px;
}

.entity:not(.is-selected) .entity-icon {
  width: 24px;
  height: 24px;
}

.road-path {
  opacity: 0.16;
  filter: none;
}

.road-node {
  opacity: 0.26;
  filter: none;
}

.road-path.status-in-progress,
.road-path.status-active {
  opacity: 0.42;
}

.road-path.is-selected {
  opacity: 1;
}

.road-node.is-selected {
  opacity: 1;
}

.edit-details {
  border: 1px solid rgba(93, 132, 166, 0.24);
  background: rgba(2, 8, 15, 0.42);
}

.edit-details > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 10px;
  color: var(--cyan);
  cursor: pointer;
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.edit-details .inspector-form {
  padding: 10px;
  border-top: 1px solid rgba(93, 132, 166, 0.2);
}

.inspector-section {
  border-color: rgba(0, 229, 255, 0.36);
}

.right-panel .panel-section:not(.inspector-section) {
  padding: 8px;
}

.right-drawer {
  padding: 0;
}

.right-drawer > summary {
  min-height: 38px;
}

.right-drawer > :not(summary) {
  margin: 0 10px 10px;
}

.map-legend {
  display: none;
}

.ops-summary {
  grid-template-columns: repeat(4, minmax(92px, 1fr));
}

.ops-card {
  min-height: 40px;
  padding: 5px 7px;
  border-left-width: 1px;
}

.ops-card span,
.ops-card small {
  font-size: 9px;
}

.ops-card strong {
  font-size: 13px;
}

.map-readout span {
  flex: 0 1 auto;
}

.map-readout span:first-child {
  max-width: 230px;
}

.map-readout span:nth-child(2) {
  max-width: 180px;
}

.map-readout span:last-child {
  flex: 1;
  max-width: none;
}

.inspection-report {
  gap: 8px;
}

.inspection-header {
  padding: 8px;
}

.inspection-header strong {
  font-size: 13px;
}

.inspection-header.neutral {
  border-color: rgba(93, 132, 166, 0.22);
  background: rgba(2, 8, 15, 0.5);
}

.inspection-header.neutral strong {
  color: var(--muted);
}

.district-footnote {
  border-top: 1px solid rgba(93, 132, 166, 0.18);
  padding-top: 8px;
  color: var(--muted);
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.inspection-meta span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(93, 132, 166, 0.22);
  background: rgba(2, 8, 15, 0.44);
  color: var(--text);
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

.inspection-meta strong,
.notes-preview span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.notes-preview {
  display: grid;
  gap: 5px;
  padding: 7px;
  border: 1px solid rgba(93, 132, 166, 0.18);
  background: rgba(2, 8, 15, 0.34);
}

.notes-preview p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.inspection-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  gap: 6px;
  border: 1px solid rgba(0, 229, 255, 0.3);
  background: rgba(0, 229, 255, 0.055);
  color: var(--cyan);
  cursor: pointer;
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.inspection-actions button[data-action="delete"] {
  border-color: rgba(255, 92, 138, 0.46);
  background: rgba(255, 92, 138, 0.055);
  color: var(--rose);
}

.edit-details {
  margin-top: 8px;
}

.entity:not(.is-selected).status-stocked .entity-copy,
.entity:not(.is-selected).status-completed .entity-copy {
  display: none;
}

.entity:not(.is-selected).status-blocked .resource-badge,
.entity:not(.is-selected).status-blocked .status-badge,
.entity:not(.is-selected).status-in-progress .resource-badge {
  display: inline-flex;
}

.entity:not(.is-selected) .status-corner {
  transform: scale(0.86);
  transform-origin: top right;
}

.entity:not(.is-selected).status-active .entity-copy {
  display: none;
}

body[data-current-view="Resources"] .entity:not(.is-selected).is-active-resource .entity-copy {
  display: block;
}

/* Calmer HUD balance: map first, chrome second. */
body {
  background:
    radial-gradient(circle at 18% 14%, rgba(103, 215, 234, 0.055), transparent 28rem),
    radial-gradient(circle at 78% 12%, rgba(240, 189, 104, 0.035), transparent 24rem),
    #0b111a;
}

body::after {
  opacity: 0.03;
}

.app-shell {
  grid-template-columns: 190px minmax(780px, 1fr) 300px;
  grid-template-rows: 56px minmax(0, 1fr);
  gap: 10px;
}

.topbar,
.side-panel,
.map-controls,
.panel-section,
.map-viewport,
.workspace-status {
  border-color: rgba(103, 215, 234, 0.18);
  background: rgba(12, 22, 34, 0.78);
  box-shadow: none;
}

.topbar {
  padding: 6px 10px;
}

.brand-lockup strong,
.section-title h2,
.sector-map-title strong,
.inspection-header strong,
.right-panel summary span:last-child {
  font-family:
    Oxanium, Rajdhani, Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.035em;
  text-transform: none;
}

.brand-lockup strong {
  font-size: 16px;
  font-weight: 650;
}

.section-title h2,
.sector-map-title strong {
  font-size: 15px;
  font-weight: 650;
}

.right-panel summary span:last-child {
  color: #c8d6df;
  font-size: 13px;
  font-weight: 600;
}

.title-icon {
  display: inline;
  width: auto;
  height: auto;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(103, 215, 234, 0.72);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  box-shadow: none;
}

.section-title {
  gap: 7px;
  align-items: baseline;
  margin-bottom: 12px;
}

.map-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 8px;
}

.control-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.mode-row {
  grid-column: 1 / -1;
}

.tool-row {
  grid-column: 1 / -1;
}

.view-tabs {
  flex: 0 0 260px;
  border-color: rgba(103, 215, 234, 0.16);
  border-radius: 8px;
  background: rgba(8, 15, 24, 0.58);
}

.view-tab,
.tool-mode,
.hud-button,
.map-setup summary,
.snap-switch,
.telemetry-pill,
.search-rig,
.zoom-rig .icon-button {
  border-color: rgba(103, 215, 234, 0.18);
  border-radius: 7px;
  background: rgba(8, 15, 24, 0.62);
  color: #bdd0dc;
  font-family:
    Oxanium, Rajdhani, Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.025em;
  text-transform: none;
  box-shadow: none;
}

.view-tab.is-active,
.tool-mode.is-active {
  color: var(--cyan);
  background: rgba(103, 215, 234, 0.11);
  box-shadow: inset 0 -2px 0 rgba(103, 215, 234, 0.55);
}

.search-rig {
  margin-left: auto;
}

.zoom-rig {
  margin-left: 0;
}

.snap-switch {
  color: var(--emerald);
  background: rgba(114, 228, 184, 0.065);
}

.panel-section {
  padding: 12px;
}

.palette-list {
  gap: 8px;
}

.palette-item {
  min-height: 48px;
  gap: 8px;
  margin: 0;
  border-color: rgba(145, 163, 178, 0.14);
  border-radius: 8px;
  background: rgba(9, 17, 28, 0.6);
}

.left-panel .panel-section {
  padding: 10px;
}

.left-panel .section-title {
  margin-bottom: 10px;
}

.palette-color {
  width: 3px;
  border-radius: 999px;
  opacity: 0.85;
  box-shadow: none;
}

.layer-add {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-color: color-mix(in srgb, var(--palette-color), transparent 35%);
  border-radius: 7px;
  color: color-mix(in srgb, var(--palette-color), white 18%);
  background: rgba(2, 8, 15, 0.44);
  font-size: 11px;
}

.palette-copy strong {
  color: #dce8ef;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: none;
}

.palette-copy span {
  color: #8798a8;
  font-size: 10px;
  letter-spacing: 0.02em;
  text-transform: none;
}

.layer-visible {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.layer-visible input {
  position: static;
  width: 13px;
  height: 13px;
  opacity: 1;
  accent-color: var(--palette-color);
}

.layer-visible span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.map-stage {
  position: relative;
}

.map-mini-overlay {
  position: absolute;
  right: 20px;
  bottom: 62px;
  z-index: 45;
  display: grid;
  width: 168px;
  justify-items: stretch;
  transform: translateY(8px);
  gap: 6px;
  padding: 9px;
  border: 1px solid rgba(103, 215, 234, 0.24);
  border-radius: 12px;
  opacity: 0;
  background: rgba(8, 15, 24, 0.78);
  backdrop-filter: blur(10px);
  pointer-events: none;
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.map-mini-overlay.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.map-mini-overlay .mini-map {
  display: grid;
  width: 136px;
  height: 136px;
  place-items: center;
  justify-self: center;
  overflow: hidden;
  border-radius: 9px;
}

.map-mini-overlay .mini-map-title {
  color: #91a2b3;
  font-size: 10px;
  text-transform: none;
  text-align: left;
}

.workspace-status {
  right: 18px;
  bottom: 16px;
  left: 18px;
  border-radius: 10px;
  background: rgba(8, 15, 24, 0.62);
}

.workspace-status span {
  border-color: rgba(145, 163, 178, 0.12);
  border-radius: 7px;
  background: rgba(5, 11, 18, 0.48);
  color: #a7b6c4;
  font-size: 10px;
}

.workspace-status button {
  border-radius: 7px;
}

.inspection-header,
.inspection-meta span,
.notes-preview {
  border-color: rgba(145, 163, 178, 0.14);
  background: rgba(7, 14, 23, 0.5);
}

.inspection-header span,
.inspection-header small,
.sector-health span,
.requirement-row small,
.inspection-meta strong,
.notes-preview span {
  color: #8fa0af;
  font-size: 9px;
  letter-spacing: 0.035em;
  text-transform: none;
}

.inspection-header strong {
  font-size: 16px;
  font-weight: 650;
}

.map-surface::after {
  opacity: 0.74;
}

.topbar {
  justify-content: flex-start;
}

.context-menu {
  position: relative;
  flex: 0 1 auto;
  width: auto;
  min-width: 0;
  justify-content: flex-start;
}

.context-menu summary {
  display: flex;
  width: clamp(220px, 24vw, 330px);
  min-height: 36px;
  align-items: center;
  gap: 9px;
  padding: 6px 10px;
  border: 1px solid rgba(103, 215, 234, 0.2);
  border-radius: 9px;
  background: rgba(8, 15, 24, 0.66);
  color: #d8e5ed;
  cursor: pointer;
  list-style: none;
}

.context-menu summary::-webkit-details-marker {
  display: none;
}

.context-menu summary::after {
  margin-left: auto;
  color: rgba(103, 215, 234, 0.7);
  content: "⌄";
  font-size: 13px;
  line-height: 1;
}

.context-menu[open] summary {
  border-color: rgba(103, 215, 234, 0.48);
  background: rgba(15, 30, 44, 0.86);
}

.context-summary-icon {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(103, 215, 234, 0.32);
  border-radius: 7px;
  color: var(--cyan);
  background: rgba(103, 215, 234, 0.07);
}

.context-summary-icon .icon-svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.7;
}

.context-summary-text {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.context-summary-text span,
.context-summary-text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.context-summary-text span {
  color: #8fa0af;
  font-size: 10px;
  letter-spacing: 0.02em;
}

.context-summary-text strong {
  color: #edf5f8;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.context-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 120;
  display: grid;
  width: min(360px, calc(100vw - 32px));
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(103, 215, 234, 0.26);
  border-radius: 10px;
  background: rgba(10, 18, 29, 0.96);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

.context-popover label {
  width: auto;
  color: #8fa0af;
  font-size: 10px;
  letter-spacing: 0.035em;
}

.context-popover select {
  height: 34px;
  margin-top: 5px;
  border-radius: 8px;
  background: rgba(5, 12, 20, 0.92);
  font-size: 12px;
  letter-spacing: 0.025em;
  text-transform: none;
}

.sync-strip {
  margin-left: auto;
}

/* Map-first layout: layers move into the command bar and the canvas gets the freed column. */
.app-shell {
  grid-template-columns: minmax(0, 1fr) 300px;
}

.left-panel {
  display: none;
}

.workspace {
  grid-column: 1;
}

.right-panel {
  grid-column: 2;
}

.header-layers {
  position: relative;
  flex: 0 0 auto;
}

.header-layers summary {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 9px;
  border: 1px solid rgba(103, 215, 234, 0.2);
  border-radius: 9px;
  background: rgba(8, 15, 24, 0.66);
  color: #d8e5ed;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
  list-style: none;
}

.header-layers summary::-webkit-details-marker {
  display: none;
}

.header-layers summary::after {
  margin-left: 2px;
  color: rgba(103, 215, 234, 0.68);
  content: "⌄";
  font-size: 13px;
}

.header-layers[open] summary {
  border-color: rgba(103, 215, 234, 0.48);
  background: rgba(15, 30, 44, 0.86);
}

.header-layers-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(103, 215, 234, 0.28);
  border-radius: 7px;
  color: var(--cyan);
  background: rgba(103, 215, 234, 0.07);
}

.header-layers-icon .icon-svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.8;
}

.header-layers-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 130;
  display: grid;
  width: min(360px, calc(100vw - 32px));
  max-height: calc(100vh - 92px);
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(103, 215, 234, 0.26);
  border-radius: 10px;
  background: rgba(10, 18, 29, 0.97);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

.header-layers .palette-list {
  gap: 8px;
}

.header-layers .palette-item {
  min-height: 52px;
  margin: 0;
  padding: 8px;
  border-color: rgba(145, 163, 178, 0.15);
  border-radius: 8px;
  background: rgba(9, 17, 28, 0.72);
}

.header-layers .palette-copy {
  min-width: 0;
}

.header-layers .palette-copy strong {
  color: #dce8ef;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-transform: none;
}

.header-layers .palette-copy span {
  color: #8798a8;
  font-size: 10px;
  letter-spacing: 0.01em;
  text-transform: none;
}

.header-layers .layer-visible {
  position: relative;
  width: 28px;
  height: 28px;
  justify-self: end;
  border: 1px solid color-mix(in srgb, var(--palette-color), transparent 50%);
  border-radius: 7px;
  background: color-mix(in srgb, var(--palette-color), transparent 88%);
}

.header-layers .layer-visible input {
  position: static;
  width: 14px;
  height: 14px;
  opacity: 1;
  accent-color: var(--palette-color);
}

.map-controls {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
}

.control-row.tool-row {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.mode-row,
.view-tabs {
  display: none;
}

.mode-cluster {
  flex: 0 0 auto;
}

.search-rig {
  flex: 1 1 160px;
  max-width: 240px;
  margin-left: auto;
}

.map-setup summary,
.snap-switch,
.tool-mode,
.hud-button {
  white-space: nowrap;
}

.road-width-control {
  display: none;
}

body[data-tool-mode="road"] .road-width-control,
body[data-selected-kind="road"] .road-width-control {
  display: grid;
}

.map-setup {
  position: relative;
  flex: 0 0 auto;
}

.map-setup summary {
  min-width: 0;
  min-height: 34px;
  padding: 0 11px;
  border-color: rgba(103, 215, 234, 0.2);
  border-radius: 8px;
  background: rgba(8, 15, 24, 0.62);
  color: #bdd0dc;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: none;
}

.map-setup[open] summary {
  border-color: rgba(103, 215, 234, 0.48);
  color: var(--cyan);
  background: rgba(15, 30, 44, 0.86);
}

.map-setup-inner {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 150;
  display: grid;
  width: 360px;
  max-width: min(360px, calc(100vw - 28px));
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(103, 215, 234, 0.26);
  border-radius: 10px;
  background: rgba(10, 18, 29, 0.97);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

.map-setup-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.map-setup-heading strong {
  color: #e6f0f5;
  font-size: 14px;
  font-weight: 650;
}

.map-setup-heading span {
  color: #8fa0af;
  font-size: 10px;
}

.map-setup-inner .segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.map-setup-inner .seg-button {
  min-height: 32px;
  border-radius: 8px;
  color: #bdd0dc;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: none;
}

.map-setup-inner .seg-button.is-active {
  border-color: rgba(103, 215, 234, 0.5);
  color: var(--cyan);
  background: rgba(103, 215, 234, 0.1);
}

.map-setup-inner .control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.map-setup-inner label {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: #8fa0af;
  font-size: 10px;
  letter-spacing: 0.025em;
  text-transform: none;
}

.map-setup-inner input {
  height: 34px;
  margin: 0;
  padding: 0 9px;
  border-color: rgba(145, 163, 178, 0.18);
  border-radius: 8px;
  background: rgba(5, 12, 20, 0.92);
  color: #e9f2f7;
  font-size: 13px;
}

.map-setup-inner [data-mode-field].is-muted {
  display: none;
}

.map-setup-inner .tile-size-field {
  grid-column: 1 / -1;
}

.context-menu:not([open]) .context-popover,
.header-layers:not([open]) .header-layers-popover,
.map-setup:not([open]) .map-setup-inner {
  display: none;
}

/* Typography hierarchy pass: fewer sizes, larger headers, calmer metadata. */
:root {
  --font-display: Rajdhani, Oxanium, Inter, ui-sans-serif, system-ui, sans-serif;
  --font-ui: Oxanium, Rajdhani, Inter, ui-sans-serif, system-ui, sans-serif;
  --font-data: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --type-display: 19px;
  --type-panel-title: 17px;
  --type-control: 13px;
  --type-body: 13px;
  --type-meta: 11px;
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-ui);
}

.brand-lockup strong,
.section-title h2,
.sector-map-title strong,
.right-panel summary span:last-child,
.inspection-header strong,
.map-setup-heading strong {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: none;
}

.brand-lockup strong,
.sector-map-title strong,
.inspection-header strong {
  font-size: var(--type-display);
}

.section-title h2,
.right-panel summary span:last-child,
.map-setup-heading strong {
  font-size: var(--type-panel-title);
}

.brand-lockup div > span,
.context-summary-text span,
.sector-map-title span:not(.title-icon),
.inspection-header span,
.inspection-header small,
.map-setup-heading span,
.map-setup-inner label,
.palette-copy span,
.inspection-meta strong,
.sector-health span,
.notes-preview span {
  color: #93a6b5;
  font-size: var(--type-meta);
  letter-spacing: 0.01em;
  text-transform: none;
}

.context-summary-text strong,
.header-layers summary,
.tool-mode,
.hud-button,
.snap-switch,
.map-setup summary,
.map-setup-inner .seg-button,
.search-rig input,
.search-rig button,
.palette-copy strong,
.inspection-meta span,
.notes-preview,
.resource-row,
.task-row,
.collab-row,
.support-ticket,
.chat-form input,
.chat-form button,
.support-form input,
.support-form select,
.support-form button {
  font-size: var(--type-control);
  letter-spacing: 0.01em;
  text-transform: none;
}

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

.settings-panel button {
  min-height: 36px;
  border: 1px solid rgba(103, 215, 234, 0.2);
  border-radius: 8px;
  background: rgba(8, 15, 24, 0.62);
  color: #bdd0dc;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: var(--type-control);
  font-weight: 650;
}

.settings-panel button:hover {
  border-color: rgba(103, 215, 234, 0.48);
  color: var(--cyan);
  background: rgba(103, 215, 234, 0.08);
}

.settings-panel .snap-switch {
  display: inline-flex;
  width: 100%;
  min-height: 36px;
  justify-content: flex-start;
  border-color: rgba(114, 228, 184, 0.22);
  border-radius: 8px;
  background: rgba(114, 228, 184, 0.055);
}

.settings-panel .map-setup {
  width: 100%;
}

.settings-panel .map-setup summary {
  display: flex;
  width: 100%;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px;
}

.settings-panel .map-setup summary::after {
  color: rgba(103, 215, 234, 0.68);
  content: "⌄";
}

.settings-panel .map-setup-inner {
  position: static;
  width: 100%;
  max-width: none;
  margin-top: 8px;
  padding: 10px;
  border-color: rgba(103, 215, 234, 0.18);
  background: rgba(5, 12, 20, 0.56);
  box-shadow: none;
}

.settings-panel .map-setup-inner .control-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-panel .map-setup-inner input {
  height: 32px;
}

.map-controls {
  min-height: 44px;
}

.workspace-status {
  align-items: center;
}

.workspace-status .map-zoom-rig {
  pointer-events: auto;
}

.map-zoom-rig {
  flex: 0 0 214px;
  grid-template-columns: 24px minmax(54px, 74px) 24px 30px 38px;
  gap: 4px;
  align-items: center;
  padding: 3px;
  border: 1px solid rgba(145, 163, 178, 0.12);
  border-radius: 7px;
  background: rgba(5, 11, 18, 0.48);
}

.map-zoom-rig .icon-button,
.map-zoom-rig .hud-button {
  min-width: 0;
  min-height: 22px;
  padding: 0 4px;
  border-radius: 6px;
  font-size: 10px;
}

.map-zoom-rig input[type="range"] {
  width: 100%;
  min-width: 0;
}

.map-zoom-rig .telemetry-pill {
  display: grid;
  min-height: 22px;
  place-items: center;
  padding: 0 4px;
  border-radius: 6px;
  font-size: 10px;
}

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

.context-summary-text strong,
.palette-copy strong {
  font-weight: 650;
}

.title-icon {
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.section-title,
.right-panel summary,
.sector-map-title {
  align-items: center;
}

.right-panel .panel-section {
  padding: 13px 14px;
}

.right-panel summary {
  min-height: 56px;
}

.map-readout span,
.workspace-status span,
.workspace-status button,
.telemetry-pill,
.grid-label,
.entity-copy small,
.status-badge,
.resource-badge {
  font-family: var(--font-data);
  font-size: var(--type-meta);
  letter-spacing: 0;
}

.map-setup-inner input,
.road-width-control input,
.context-popover select {
  font-size: var(--type-control);
}

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

  .app-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(560px, 1fr) auto;
    height: auto;
    min-height: 100vh;
  }

  .topbar {
    flex-wrap: wrap;
  }

  .right-panel {
    grid-column: 1 / -1;
    grid-row: 3;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .workspace {
    grid-column: 1;
  }

  .control-grid {
    grid-template-columns: repeat(4, minmax(82px, 1fr));
  }

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

@media (max-width: 780px) {
  .app-shell {
    display: block;
  }

  .topbar,
  .map-controls {
    align-items: stretch;
  }

  .context-strip,
  .sync-strip {
    justify-content: flex-start;
  }

  .context-strip {
    width: auto;
  }

  .context-menu summary {
    width: min(100%, 330px);
  }

  .context-popover label {
    width: auto;
  }

  .side-panel {
    max-height: none;
  }

  .control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .view-tabs,
  .search-rig,
  .saved-views,
  .zoom-rig,
  .mode-cluster {
    width: 100%;
    min-width: 0;
  }

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

  .map-stage {
    height: 68vh;
  }
}

/* Map-first cleanup pass: collapse inactive chrome and keep overlays out of the canvas. */
.workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
}

.map-stage {
  grid-template-rows: minmax(0, 1fr) !important;
  min-height: 0;
}

.ops-strip,
.sector-ghost,
.selection-callout {
  display: none !important;
}

.map-viewport {
  min-height: 0;
}

.workspace-status {
  position: static;
  inset: auto;
  z-index: auto;
  display: flex;
  flex-wrap: nowrap;
  min-height: 40px;
  margin: 0;
  padding: 6px;
  border-radius: 12px;
  pointer-events: auto;
}

.workspace-status span {
  flex: 0 1 auto;
  min-width: 82px;
}

#selectedReadout {
  flex: 1 1 180px;
}

#coordReadout,
#gridReadout,
#roadReadout {
  flex: 0 1 148px;
}

.workspace-status .map-zoom-rig {
  flex: 0 0 204px;
}

.map-controls {
  border-radius: 12px;
}

.map-tool-palette {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  gap: 6px;
}

.map-tool-palette .tool-mode {
  min-height: 34px;
  padding: 0 10px;
  gap: 6px;
}

.map-tool-palette .mini-icon {
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
}

.map-tool-palette .icon-svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.8;
}

.search-rig {
  flex: 1 1 320px;
  max-width: 440px;
  min-width: 260px;
}

.search-rig input {
  font-size: 14px;
}

body[data-selection-state="none"] .tool-actions {
  display: none;
}

.context-popover,
.header-layers-popover {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: auto !important;
  left: 0 !important;
  z-index: 9000;
  transform: none !important;
}

.topbar {
  position: relative;
  z-index: 8500;
  overflow: visible;
}

.context-menu,
.header-layers,
.search-rig {
  position: relative;
  overflow: visible;
}

.context-menu[open],
.header-layers[open] {
  z-index: 9100;
}

.context-popover {
  width: min(360px, calc(100vw - 16px));
}

.header-layers-popover {
  width: min(390px, calc(100vw - 16px));
}

.sector-size-dialog {
  width: min(540px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 48px));
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
}

.sector-size-dialog::backdrop {
  background: rgba(3, 8, 14, 0.68);
  backdrop-filter: blur(5px);
}

.sector-size-dialog .map-setup-inner {
  position: static;
  right: auto;
  display: grid !important;
  width: 100%;
  max-width: none;
  max-height: calc(100vh - 64px);
  overflow: auto;
  padding: 16px;
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
}

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

.sector-size-calculator > div {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid rgba(103, 215, 234, 0.18);
  border-radius: 10px;
  background: rgba(103, 215, 234, 0.06);
}

.sector-size-calculator span,
.sector-size-calculator small {
  color: #9cafbd;
  font-family: var(--font-data);
  font-size: 11px;
}

.sector-size-calculator strong {
  color: #f1f8fb;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
}

.dialog-actions button {
  min-height: 36px;
  padding: 0 18px;
  border: 1px solid rgba(103, 215, 234, 0.34);
  border-radius: 9px;
  background: rgba(103, 215, 234, 0.08);
  color: var(--cyan);
  cursor: pointer;
  font-family: var(--font-ui);
  font-weight: 700;
}

.road-group .road-cell,
.road-draft-cell {
  fill: color-mix(in srgb, var(--road-color, var(--amber)), transparent 36%);
  stroke: color-mix(in srgb, var(--road-color, var(--amber)), white 14%);
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
}

.road-group:not(.is-selected) .road-cell {
  opacity: 0.32;
}

.road-group.is-active .road-cell {
  opacity: 0.55;
}

.road-group.is-selected .road-cell {
  fill: color-mix(in srgb, var(--cyan), var(--amber) 18%);
  stroke: rgba(226, 250, 255, 0.9);
  opacity: 0.9;
  filter: drop-shadow(0 0 8px rgba(103, 215, 234, 0.34));
}

.road-draft-cell {
  fill: rgba(103, 215, 234, 0.48);
  stroke: rgba(230, 250, 255, 0.9);
  filter: drop-shadow(0 0 10px rgba(103, 215, 234, 0.32));
}

.road-node {
  fill: rgba(4, 9, 16, 0.9);
  stroke: rgba(240, 189, 104, 0.7);
}

.road-node.is-selected {
  stroke: rgba(230, 250, 255, 0.95);
}

.map-background-image {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  pointer-events: none;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  filter: saturate(0.9) contrast(0.92) brightness(0.78);
}

.map-surface::before {
  z-index: 2;
}

.background-dialog {
  width: min(1180px, calc(100vw - 32px));
  max-height: min(860px, calc(100vh - 36px));
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
}

.background-dialog::backdrop {
  background: rgba(3, 8, 14, 0.72);
  backdrop-filter: blur(6px);
}

.background-tool {
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 42px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(103, 215, 234, 0.24);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(103, 215, 234, 0.08), transparent 38%),
    rgba(8, 15, 25, 0.98);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.56), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.background-tool-header,
.background-controls,
.background-dropzone,
.background-workbench,
.background-sidecar,
.background-export-actions,
.panel-kicker {
  display: grid;
}

.background-tool-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.background-tool-header strong {
  display: block;
  color: #f0f8fc;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1;
}

.background-tool-header span {
  display: block;
  margin-top: 5px;
  color: #9cafbd;
  font-size: 14px;
}

#closeBackgroundImport {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(145, 163, 178, 0.2);
  border-radius: 11px;
  background: rgba(5, 12, 20, 0.64);
  color: #d8e8ee;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.background-dropzone {
  position: relative;
  grid-template-columns: minmax(160px, 240px) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 86px;
  padding: 14px;
  border: 1px dashed rgba(103, 215, 234, 0.34);
  border-radius: 16px;
  background:
    repeating-linear-gradient(90deg, rgba(103, 215, 234, 0.04) 0 1px, transparent 1px 12px),
    rgba(5, 12, 20, 0.54);
  cursor: pointer;
}

.background-dropzone.is-drag-over {
  border-color: rgba(114, 228, 184, 0.7);
  background-color: rgba(114, 228, 184, 0.07);
}

.background-dropzone input {
  min-height: 44px;
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
}

.background-dropzone strong,
.panel-kicker strong {
  color: #edf8fc;
  font-family: var(--font-display);
  font-size: 16px;
}

.background-dropzone span,
.panel-kicker span {
  color: #9cafbd;
  font-size: 13px;
}

.background-controls {
  grid-template-columns: repeat(5, minmax(110px, 1fr)) auto auto;
  gap: 10px;
  align-items: end;
}

.background-controls label {
  display: grid;
  gap: 6px;
  color: #94a7b5;
  text-transform: none;
}

.background-controls input {
  min-height: 40px;
  padding: 0 10px;
  border-radius: 11px;
  font-size: 14px;
}

.background-controls input[type="range"] {
  padding: 0;
  accent-color: var(--cyan);
}

.background-controls button,
.background-export-actions button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(103, 215, 234, 0.26);
  border-radius: 11px;
  background: rgba(103, 215, 234, 0.07);
  color: #cfeaf2;
  cursor: pointer;
  font-weight: 700;
}

.background-controls button:hover,
.background-export-actions button:hover,
#closeBackgroundImport:hover {
  border-color: rgba(103, 215, 234, 0.52);
  background: rgba(103, 215, 234, 0.12);
}

#clearBackground {
  border-color: rgba(239, 120, 148, 0.26);
  color: #f0beca;
  background: rgba(239, 120, 148, 0.06);
}

.background-workbench {
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.85fr);
  gap: 14px;
  min-height: 0;
}

.background-preview-panel,
.background-sidecar > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(145, 163, 178, 0.16);
  border-radius: 16px;
  background: rgba(5, 12, 20, 0.48);
}

.background-sidecar {
  gap: 12px;
}

.panel-kicker {
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  margin-bottom: 10px;
}

.background-workbench canvas {
  display: block;
  width: 100%;
  border: 1px solid rgba(103, 215, 234, 0.18);
  border-radius: 13px;
  background: rgba(3, 9, 16, 0.82);
}

#backgroundPreview {
  height: min(52vh, 520px);
}

#palettePreview {
  height: 170px;
}

#rebuildPreview {
  height: 220px;
}

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

@media (max-width: 1050px) {
  .background-controls,
  .background-workbench,
  .background-dropzone {
    grid-template-columns: 1fr;
  }

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

.right-panel > .secondary-section {
  display: none !important;
}

.inspector-section .title-icon {
  display: none;
}

.inspector-section .section-title h2 {
  font-size: 20px;
}

.inspection-report {
  display: grid;
  gap: 12px;
}

.inspector-hero {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid rgba(145, 163, 178, 0.16);
  border-radius: 12px;
  background: rgba(7, 14, 23, 0.58);
}

.inspector-hero.selected {
  border-color: color-mix(in srgb, var(--status-color), transparent 55%);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--status-color), transparent 90%), transparent 72%),
    rgba(7, 14, 23, 0.58);
}

.inspector-hero span,
.inspector-hero p,
.inspection-context h4,
.need-panel h4,
.relationship-panel h4,
.resource-panel h4 {
  margin: 0;
  color: #9cafbd;
  font-family: var(--font-data);
  font-size: 11px;
}

.inspector-hero h3 {
  margin: 0;
  color: #f1f8fb;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.05;
}

.inspector-hero p {
  line-height: 1.4;
}

.inspector-hero p strong {
  color: var(--emerald);
}

.sector-health.compact {
  grid-template-columns: 1fr 86px auto;
}

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

.inspection-kpis button,
.inspection-focus-nav button,
.inspection-row,
.settings-context button {
  border: 1px solid rgba(145, 163, 178, 0.16);
  border-radius: 10px;
  background: rgba(8, 15, 24, 0.58);
  color: #cbd8e1;
}

.inspection-kpis button {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 10px;
  cursor: pointer;
  text-align: left;
}

.inspection-kpis button span {
  color: #93a6b5;
  font-size: 11px;
}

.inspection-kpis button strong {
  color: #f1f8fb;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
}

.inspection-kpis button.is-active,
.inspection-focus-nav button.is-active {
  border-color: rgba(103, 215, 234, 0.48);
  background: rgba(103, 215, 234, 0.1);
  color: var(--cyan);
}

.inspection-focus-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.inspection-focus-nav button {
  min-height: 30px;
  padding: 0 9px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 650;
}

.inspection-context,
.need-panel,
.relationship-panel,
.resource-panel {
  display: grid;
  gap: 8px;
}

.inspection-list {
  display: grid;
  gap: 7px;
}

.inspection-row {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 10px;
  text-align: left;
}

button.inspection-row,
.settings-context button {
  cursor: pointer;
}

button.inspection-row:hover,
.settings-context button:hover {
  border-color: rgba(103, 215, 234, 0.42);
  background: rgba(103, 215, 234, 0.08);
}

.inspection-row > span:last-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.inspection-row strong {
  overflow: hidden;
  color: #e5eef3;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspection-row small,
.inspection-row em {
  overflow: hidden;
  color: #94a5b3;
  font-size: 11px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-icon {
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--row-color, var(--cyan)), transparent 48%);
  border-radius: 9px;
  color: color-mix(in srgb, var(--row-color, var(--cyan)), white 18%);
  background: color-mix(in srgb, var(--row-color, var(--cyan)), transparent 90%);
}

.row-icon .icon-svg {
  width: 18px;
  height: 18px;
}

.resource-dot,
.alert-dot {
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--emerald);
  box-shadow: 0 0 10px rgba(114, 228, 184, 0.28);
}

.alert-dot {
  background: var(--rose);
  box-shadow: 0 0 10px rgba(239, 120, 148, 0.32);
}

.resource-summary-row.needs-attention .resource-dot {
  background: var(--amber);
}

.status-summary {
  display: grid;
  gap: 4px;
  padding: 11px;
  border: 1px solid rgba(114, 228, 184, 0.26);
  border-radius: 10px;
  background: rgba(114, 228, 184, 0.055);
}

.status-summary.has-blockers {
  border-color: rgba(239, 120, 148, 0.32);
  background: rgba(239, 120, 148, 0.06);
}

.status-summary span {
  color: #9cafbd;
  font-size: 11px;
}

.status-summary strong {
  color: #f1f8fb;
  font-size: 15px;
}

.status-summary small {
  color: #aab8c4;
  font-size: 12px;
}

.need-panel,
.relationship-panel,
.resource-panel,
.notes-preview,
.inline-editor {
  padding: 11px;
  border: 1px solid rgba(145, 163, 178, 0.14);
  border-radius: 10px;
  background: rgba(7, 14, 23, 0.46);
}

.need-panel p,
.relationship-panel p,
.resource-panel p {
  margin: 0;
  color: #bdcbd5;
  font-size: 13px;
  line-height: 1.4;
}

.inspection-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.inspection-actions button {
  border-radius: 9px;
  text-transform: none;
}

.inline-editor {
  display: grid;
  gap: 10px;
}

.inline-editor input,
.inline-editor select,
.inline-editor textarea {
  border-radius: 8px;
  font-size: 13px;
}

.selected-report.is-editing {
  gap: 10px;
}

.edit-hero {
  gap: 10px;
}

.inline-field {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.inline-field span {
  color: #9cafbd;
  font-family: var(--font-data);
  font-size: 11px;
}

.inline-field input,
.inline-field select,
.inline-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(145, 163, 178, 0.18);
  border-radius: 9px;
  background: rgba(4, 10, 18, 0.82);
  color: #f1f8fb;
  font-family: var(--font-ui);
  font-size: 14px;
}

.inline-field input,
.inline-field select {
  min-height: 38px;
  padding: 0 10px;
}

.inline-field textarea {
  min-height: 82px;
  padding: 10px;
  resize: vertical;
}

.title-field input {
  min-height: 44px;
  color: #f6fbfe;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
}

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

.inline-field-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.editable-meta .inline-field {
  padding: 0;
  border: 0;
  background: transparent;
}

.editable-panel {
  padding: 11px;
}

.editable-panel .resource-chip-list {
  margin-bottom: 4px;
}

.edit-notes {
  padding: 11px;
}

.edit-notes .inline-field {
  gap: 7px;
}

.settings-context {
  display: grid;
  gap: 8px;
}

.settings-context button {
  min-height: 38px;
  padding: 0 12px;
  color: #dbe8ee;
  font-family: var(--font-ui);
  font-weight: 650;
}

@media (max-width: 1180px) {
  .workspace-status {
    display: flex;
  }
}

@media (max-width: 780px) {
  .workspace-status {
    flex-wrap: wrap;
  }

  .search-rig {
    max-width: none;
  }
}

/* Single command bar: no persistent app header, larger map tools. */
.app-shell {
  grid-template-columns: minmax(0, 1fr) 300px;
  grid-template-rows: minmax(0, 1fr);
  gap: 10px;
  padding: 8px;
}

.workspace {
  grid-column: 1;
  grid-row: 1;
}

.right-panel {
  grid-column: 2;
  grid-row: 1;
}

.map-controls {
  position: relative;
  z-index: 8500;
  min-height: 66px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(10, 18, 29, 0.82);
}

.control-row.tool-row {
  flex-wrap: nowrap;
  gap: 8px;
}

.select-tool {
  min-height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 15px;
}

.command-group {
  position: relative;
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 5px;
  padding: 7px 6px 5px;
  border: 1px solid rgba(145, 163, 178, 0.16);
  border-radius: 14px;
  background: rgba(5, 12, 20, 0.48);
}

.command-group-label {
  position: absolute;
  top: -8px;
  left: 10px;
  padding: 1px 6px;
  border: 1px solid rgba(145, 163, 178, 0.14);
  border-radius: 999px;
  background: rgba(8, 15, 24, 0.96);
  color: #93a6b5;
  font-family: var(--font-data);
  font-size: 11px;
  letter-spacing: 0;
}

.create-group {
  flex: 0 0 auto;
}

.map-tool-palette {
  gap: 6px;
}

.map-tool-palette .tool-mode,
.view-group .header-layers summary,
.view-group .context-menu summary {
  min-height: 38px;
  border-radius: 10px;
}

.map-tool-palette .tool-mode {
  padding: 0 8px;
  font-size: 13px;
}

.view-group {
  flex: 0 0 auto;
}

.view-group .header-layers summary {
  padding: 6px 12px 6px 9px;
  font-size: 14px;
}

.view-group .context-menu summary {
  width: 190px;
  padding: 5px 9px;
}

.project-context-menu,
.command-presence {
  display: none;
}

.view-group .context-summary-icon {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
}

.view-group .context-summary-text span {
  font-size: 9px;
}

.view-group .context-summary-text strong {
  font-size: 12px;
}

.command-presence {
  margin-left: 0;
  padding: 0 2px;
}

.search-rig {
  flex: 1 1 220px;
  min-width: 210px;
  max-width: 330px;
}

.search-rig input {
  height: 40px;
}

.search-rig button {
  min-height: 40px;
}

.road-width-control {
  align-self: stretch;
  width: 96px;
}

.road-width-control input {
  height: 38px;
}

.tool-actions {
  align-self: stretch;
}

.tool-actions .icon-button {
  min-height: 40px;
  border-radius: 10px;
}

.context-popover,
.header-layers-popover {
  z-index: 9200;
}

.context-menu[open],
.header-layers[open] {
  z-index: 9300;
}

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

  .right-panel {
    grid-column: 1;
    grid-row: 2;
  }

  .workspace {
    grid-column: 1;
    grid-row: 1;
  }

  .control-row.tool-row {
    flex-wrap: wrap;
  }
}

/* Map-first interaction polish and quiet HUD effects. */
body::after {
  opacity: 0.035;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 39;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, transparent, rgba(103, 215, 234, 0.035), transparent),
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(103, 215, 234, 0.018) 23px, transparent 24px);
  opacity: 0.38;
}

@keyframes hud-idle-glow {
  0%,
  100% {
    opacity: 0.16;
  }

  48% {
    opacity: 0.28;
  }

  50% {
    opacity: 0.2;
  }
}

.map-controls::after,
.right-panel::after,
.workspace-status::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  content: "";
  box-shadow: inset 0 0 18px rgba(103, 215, 234, 0.08);
  opacity: 0.16;
  animation: hud-idle-glow 8s linear infinite;
}

body.is-dragging *,
body.is-dragging *::before,
body.is-dragging *::after {
  animation-play-state: paused !important;
  transition-duration: 0s !important;
}

body.is-dragging .entity,
body.is-dragging .road-cell {
  filter: none !important;
  box-shadow: none !important;
}

.road-layer {
  pointer-events: auto;
}

.road-draft-layer,
.connection-layer {
  pointer-events: none;
}

.road-group {
  cursor: pointer;
  pointer-events: visiblePainted;
}

.road-group .road-cell,
.road-group .road-node {
  pointer-events: all;
}

.map-surface.is-road-mode .entity,
.map-surface.is-road-mode .road-group,
.map-surface.is-road-mode .road-cell,
.map-surface.is-road-mode .road-node {
  pointer-events: none;
}

.map-rename-overlay {
  position: absolute;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 8px;
  pointer-events: auto;
}

.map-rename-overlay input {
  width: min(100%, 280px);
  min-height: 38px;
  border: 1px solid rgba(103, 215, 234, 0.72);
  border-radius: 10px;
  outline: 0;
  background: rgba(4, 12, 20, 0.94);
  box-shadow: 0 0 16px rgba(103, 215, 234, 0.16);
  color: #eff9fd;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  text-align: center;
}

.search-rig {
  position: relative;
  z-index: 8600;
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 9800;
  display: none;
  max-height: min(360px, 52vh);
  overflow: auto;
  padding: 7px;
  border: 1px solid rgba(103, 215, 234, 0.28);
  border-radius: 12px;
  background: rgba(6, 13, 22, 0.96);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.36), 0 0 18px rgba(103, 215, 234, 0.08);
}

.search-results.is-open {
  display: grid;
  gap: 5px;
}

.search-results button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 46px;
  padding: 7px 9px;
  border: 1px solid rgba(145, 163, 178, 0.12);
  border-radius: 9px;
  background: rgba(14, 24, 37, 0.7);
  color: #dceaf0;
  text-align: left;
}

.search-results button:hover {
  border-color: rgba(103, 215, 234, 0.48);
  background: rgba(28, 50, 66, 0.78);
}

.search-result-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(103, 215, 234, 0.26);
  border-radius: 8px;
  color: var(--cyan);
}

.search-results strong,
.search-results small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-results small,
.search-empty {
  color: #8fa1ad;
  font-size: 12px;
}

.search-empty {
  padding: 10px;
}

.road-width-control {
  position: absolute;
  top: calc(100% + 8px);
  right: 12px;
  left: auto;
  z-index: 9600;
  display: none;
  width: 132px;
  min-height: auto;
  padding: 8px;
  border: 1px solid rgba(240, 189, 104, 0.32);
  border-radius: 12px;
  background: rgba(7, 13, 21, 0.96);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28), 0 0 18px rgba(240, 189, 104, 0.08);
  color: #b5c5cf;
  font-size: 11px;
}

body[data-tool-mode="road"] .road-width-control,
body[data-selected-kind="road"] .road-width-control {
  display: grid;
  gap: 5px;
}

.road-width-control input {
  width: 100%;
  height: 34px;
}

.layer-count {
  color: #8797a4;
  font-weight: 600;
}

.header-layers .palette-copy span {
  white-space: normal;
}

body[data-map-labels="off"] .entity-copy span,
body[data-map-labels="off"] .entity-badges,
body[data-map-labels="off"] .assignee-avatar,
body[data-map-labels="off"] .status-corner {
  display: none;
}

body[data-map-labels="off"] .entity:not(.entity-zone):not(.entity-building) .entity-copy,
body[data-map-labels="off"] .entity.semantic-storage .entity-copy {
  display: none;
}

body[data-map-labels="off"] .entity-zone,
body[data-map-labels="off"] .entity-building:not(.semantic-storage) {
  align-items: center;
  justify-content: center;
  text-align: center;
}

body[data-map-labels="off"] .entity-zone .entity-icon,
body[data-map-labels="off"] .entity-building:not(.semantic-storage) .entity-icon {
  opacity: 0.5;
}

body[data-map-labels="off"] .entity-zone .entity-copy strong,
body[data-map-labels="off"] .entity-building:not(.semantic-storage) .entity-copy strong {
  white-space: normal;
}

.settings-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(145, 163, 178, 0.16);
  border-radius: 10px;
  background: rgba(5, 12, 20, 0.42);
  color: #dbe8ee;
  font-family: var(--font-ui);
  font-weight: 650;
}

.settings-check input {
  accent-color: var(--cyan);
}

.workspace-status {
  position: relative;
  grid-template-columns:
    minmax(86px, 0.8fr)
    minmax(118px, 0.9fr)
    minmax(126px, 1fr)
    minmax(82px, 0.7fr)
    minmax(270px, 1.45fr)
    minmax(130px, 1fr)
    minmax(48px, auto)
    minmax(48px, auto);
  min-height: 42px;
  padding: 6px 8px;
  border-color: rgba(103, 215, 234, 0.13);
  border-radius: 14px;
  background: rgba(6, 12, 20, 0.58);
  box-shadow: none;
}

.workspace-status > span,
.workspace-status > button {
  min-width: 0;
  min-height: 28px;
  opacity: 0.48;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-status > span:hover,
.workspace-status > button:hover {
  opacity: 0.82;
}

.workspace-status .map-zoom-rig {
  opacity: 1;
  min-height: 32px;
  padding: 3px 6px;
  border-color: rgba(103, 215, 234, 0.3);
  border-radius: 12px;
  background: rgba(11, 27, 39, 0.74);
  box-shadow: 0 0 16px rgba(103, 215, 234, 0.08);
}

.workspace-status .map-zoom-rig input {
  min-width: 96px;
}

#historyReadout {
  display: none;
}

@media (max-width: 980px) {
  .workspace-status {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-status .map-zoom-rig {
    grid-column: 1 / -1;
  }
}

/* Footer hierarchy: quiet reference data, prominent zoom, compact actions. */
.workspace-status {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(250px, 320px) minmax(0, 0.95fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 48px;
  padding: 6px 8px;
  border: 1px solid rgba(103, 215, 234, 0.12);
  border-radius: 14px;
  background: rgba(5, 11, 18, 0.58);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.018);
}

.footer-meta,
.footer-selection,
.footer-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.footer-meta {
  overflow: hidden;
}

.footer-selection {
  overflow: hidden;
}

.footer-actions {
  justify-content: flex-end;
}

.workspace-status .footer-item {
  display: grid;
  min-width: 0;
  min-height: 32px;
  align-content: center;
  gap: 1px;
  padding: 3px 8px;
  border: 1px solid rgba(145, 163, 178, 0.09);
  border-radius: 9px;
  background: rgba(2, 8, 15, 0.34);
  color: rgba(222, 235, 242, 0.72);
  font-family: var(--font-data);
  font-size: 11px;
  line-height: 1.1;
  opacity: 1;
}

.workspace-status .footer-item::before {
  content: attr(data-label);
  color: rgba(145, 163, 178, 0.64);
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: uppercase;
}

.footer-meta .footer-item {
  flex: 1 1 0;
}

.footer-selection .footer-item {
  flex: 1 1 0;
}

#historyReadout {
  display: grid;
  opacity: 0.55;
}

.workspace-status .map-zoom-rig {
  display: grid;
  grid-template-columns: auto 26px minmax(90px, 1fr) 26px 38px 44px;
  gap: 5px;
  align-items: center;
  min-height: 36px;
  padding: 4px 6px;
  border: 1px solid rgba(103, 215, 234, 0.26);
  border-radius: 12px;
  background: rgba(12, 31, 44, 0.68);
  box-shadow: 0 0 18px rgba(103, 215, 234, 0.06);
}

.zoom-label {
  padding: 0 4px;
  border: 0 !important;
  background: transparent !important;
  color: rgba(206, 229, 238, 0.82) !important;
  font-family: var(--font-ui) !important;
  font-size: 11px !important;
  font-weight: 700;
  opacity: 1 !important;
  text-transform: none;
}

.workspace-status .map-zoom-rig input {
  width: 100%;
  min-width: 0;
  accent-color: var(--cyan);
}

.workspace-status .map-zoom-rig .icon-button,
.workspace-status .map-zoom-rig .hud-button,
.workspace-status .map-zoom-rig .telemetry-pill {
  min-width: 0;
  min-height: 26px;
  padding: 0 5px;
  border-radius: 8px;
  font-size: 10px;
}

.workspace-status .telemetry-pill {
  display: grid;
  place-items: center;
  border-color: rgba(103, 215, 234, 0.18);
  background: rgba(2, 8, 15, 0.44);
  color: #dff7fc;
}

.footer-actions button {
  flex: 0 0 auto;
  min-width: 54px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 9px;
  opacity: 0.64;
}

.footer-actions button:not(:disabled):hover {
  opacity: 1;
}

@media (max-width: 1120px) {
  .workspace-status {
    grid-template-columns: minmax(0, 1fr) minmax(250px, 320px);
  }

  .footer-selection,
  .footer-actions {
    grid-column: span 1;
  }
}

@media (max-width: 760px) {
  .workspace-status {
    grid-template-columns: 1fr;
  }

  .footer-meta,
  .footer-selection {
    flex-wrap: wrap;
  }
}

.workspace-status .sr-only {
  min-width: 1px !important;
  min-height: 1px !important;
}

.selection-marquee {
  position: absolute;
  z-index: 70;
  border: 1px solid rgba(103, 215, 234, 0.82);
  border-radius: 8px;
  background: rgba(103, 215, 234, 0.14);
  box-shadow: inset 0 0 18px rgba(103, 215, 234, 0.12), 0 0 18px rgba(103, 215, 234, 0.12);
  pointer-events: none;
}

body.is-marquee-selecting .map-surface {
  cursor: crosshair;
}

.entity:hover,
.entity:focus-visible {
  opacity: 1 !important;
  outline: 2px solid rgba(103, 215, 234, 0.9);
  outline-offset: 2px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 22px rgba(103, 215, 234, 0.22);
}

body[data-zoom-tier="overview"] .map-surface.has-no-selection .entity:not(.status-blocked) {
  opacity: 0.58;
}

body[data-zoom-tier="overview"] .entity-zone,
body[data-zoom-tier="overview"] .entity-building,
body[data-zoom-tier="overview"] .entity-storage {
  min-width: 18px;
  min-height: 18px;
  padding: 0;
}

body[data-zoom-tier="overview"] .entity-zone .entity-icon,
body[data-zoom-tier="overview"] .entity-building .entity-icon,
body[data-zoom-tier="overview"] .entity-storage .entity-icon,
body[data-zoom-tier="overview"] .entity-zone .status-corner,
body[data-zoom-tier="overview"] .entity-building .status-corner,
body[data-zoom-tier="overview"] .entity-storage .status-corner {
  display: none;
}

body[data-zoom-tier="overview"] .entity-zone .entity-copy,
body[data-zoom-tier="overview"] .entity-building:not(.semantic-storage) .entity-copy,
body[data-zoom-tier="overview"] .entity-zone:hover .entity-copy,
body[data-zoom-tier="overview"] .entity-building:hover .entity-copy {
  position: absolute;
  inset: 0;
  display: grid !important;
  min-width: max-content;
  place-items: center;
  pointer-events: none;
}

body[data-zoom-tier="overview"] .entity-zone .entity-copy strong,
body[data-zoom-tier="overview"] .entity-building:not(.semantic-storage) .entity-copy strong {
  max-width: 160px;
  padding: 2px 6px;
  border: 1px solid color-mix(in srgb, var(--entity-color), white 8%);
  border-radius: 999px;
  background: rgba(2, 8, 15, 0.78);
  color: rgba(235, 247, 252, 0.92);
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
}

body[data-zoom-tier="overview"] .entity-zone:hover .entity-copy strong,
body[data-zoom-tier="overview"] .entity-building:hover .entity-copy strong {
  border-color: rgba(103, 215, 234, 0.86);
  background: rgba(5, 18, 29, 0.9);
  color: #f6fbfe;
}

body[data-zoom-tier="overview"] .entity-point,
body[data-zoom-tier="overview"] .entity-resource {
  min-width: 16px;
  min-height: 16px;
  width: 16px !important;
  height: 16px !important;
}

/* Major map objects should remain readable even when the HUD is decluttered. */
.entity-zone .entity-copy,
.entity-building:not(.semantic-storage) .entity-copy,
.entity:not(.is-selected):not(.status-blocked):not(.status-in-progress):not(.status-active).entity-zone .entity-copy,
.entity:not(.is-selected):not(.status-blocked):not(.status-in-progress):not(.status-active).entity-building:not(.semantic-storage) .entity-copy,
body[data-map-labels="off"] .entity-zone .entity-copy,
body[data-map-labels="off"] .entity-building:not(.semantic-storage) .entity-copy,
body[data-zoom-tier="overview"] .entity-zone .entity-copy,
body[data-zoom-tier="overview"] .entity-building:not(.semantic-storage) .entity-copy {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid !important;
  min-width: 0;
  place-items: center;
  padding: 6px;
  pointer-events: none;
  text-align: center;
}

.entity-zone .entity-copy > strong,
.entity-building:not(.semantic-storage) .entity-copy > strong,
body[data-zoom-tier="overview"] .entity-zone .entity-copy strong,
body[data-zoom-tier="overview"] .entity-building:not(.semantic-storage) .entity-copy strong {
  display: inline-block;
  width: fit-content;
  max-width: min(220px, calc(100% - 8px));
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--entity-color), white 10%);
  border-radius: 10px;
  background: rgba(4, 11, 18, 0.72);
  color: rgba(240, 249, 252, 0.95);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 780;
  line-height: 1.12;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.86);
  white-space: nowrap;
}

.entity-zone .entity-copy > span,
.entity-building:not(.semantic-storage) .entity-copy > span,
.entity-zone .entity-badges,
.entity-building:not(.semantic-storage) .entity-badges,
.entity-zone .assignee-avatar,
.entity-building:not(.semantic-storage) .assignee-avatar {
  display: none;
}

.entity-zone .entity-icon,
.entity-building:not(.semantic-storage) .entity-icon {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 6;
  opacity: 0.56;
}

.entity-zone:hover .entity-copy > strong,
.entity-zone:focus-visible .entity-copy > strong,
.entity-zone.is-selected .entity-copy > strong,
.entity-building:not(.semantic-storage):hover .entity-copy > strong,
.entity-building:not(.semantic-storage):focus-visible .entity-copy > strong,
.entity-building:not(.semantic-storage).is-selected .entity-copy > strong {
  border-color: rgba(103, 215, 234, 0.78);
  background: rgba(6, 18, 28, 0.9);
  color: #f7fdff;
  box-shadow: 0 0 18px rgba(103, 215, 234, 0.18);
}

body[data-zoom-tier="overview"] .entity-zone .entity-copy > strong,
body[data-zoom-tier="overview"] .entity-building:not(.semantic-storage) .entity-copy > strong {
  max-width: 180px;
  font-size: 11px;
}

/* Quiet editor-style footer: reference info recedes, zoom stays readable. */
.workspace-status {
  grid-template-columns: minmax(0, 1fr) minmax(250px, 300px) minmax(150px, 0.42fr) auto !important;
  gap: 8px !important;
  min-height: 44px !important;
  padding: 5px 8px !important;
  overflow: hidden;
}

.workspace-status .footer-item::before {
  display: none !important;
  content: "" !important;
}

.footer-meta,
.footer-selection {
  gap: 4px !important;
  overflow: hidden;
}

.footer-meta {
  display: grid !important;
  grid-template-columns: minmax(94px, 0.75fr) minmax(124px, 1.1fr) minmax(76px, 0.68fr) minmax(56px, 0.45fr);
}

.footer-selection {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
}

.workspace-status .footer-item {
  display: block !important;
  min-width: 0 !important;
  min-height: 28px !important;
  height: 28px !important;
  padding: 7px 8px 0 !important;
  overflow: hidden !important;
  border-color: rgba(145, 163, 178, 0.065) !important;
  border-radius: 9px !important;
  background: rgba(2, 8, 15, 0.22) !important;
  color: rgba(197, 214, 224, 0.62) !important;
  font-size: 10px !important;
  letter-spacing: 0 !important;
  line-height: 1 !important;
  text-overflow: ellipsis !important;
  text-transform: none !important;
  white-space: nowrap !important;
}

#mapNameReadout,
#coordReadout {
  color: rgba(214, 229, 236, 0.74) !important;
}

#roadReadout {
  color: rgba(157, 184, 194, 0.62) !important;
}

#historyReadout {
  display: none !important;
}

/* Subtle grid-native softness for draggable map footprints. */
.entity-zone,
.entity-building,
.entity-storage {
  border-radius: clamp(4px, calc(var(--tile-size, 22px) * 0.14), 7px) !important;
}

.entity-zone .status-corner,
.entity-building .status-corner,
.entity-storage .status-corner {
  border-radius: 0 5px 0 5px;
}

.mini-map svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* The road SVG covers the full map; only painted road pieces should take clicks. */
.road-layer {
  pointer-events: none !important;
}

.road-group,
.road-group .road-cell,
.road-group .road-node {
  pointer-events: auto !important;
}

.background-grid-hint {
  padding: 8px 10px;
  border: 1px solid rgba(103, 215, 234, 0.14);
  border-radius: 12px;
  background: rgba(103, 215, 234, 0.045);
  color: rgba(202, 222, 232, 0.74);
  font-family: var(--font-data);
  font-size: 12px;
  line-height: 1.35;
}

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

.footprint-summary > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(103, 215, 234, 0.16);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(103, 215, 234, 0.07), transparent 62%),
    rgba(5, 12, 20, 0.5);
}

.footprint-summary span {
  display: block;
  color: rgba(156, 175, 189, 0.86);
  font-family: var(--font-data);
  font-size: 10px;
  line-height: 1;
}

.footprint-summary strong {
  display: block;
  min-width: 0;
  margin-top: 5px;
  overflow: visible;
  color: rgba(240, 249, 252, 0.96);
  font-family: var(--font-display);
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.08;
  text-overflow: clip;
  white-space: normal;
}

.footprint-summary small {
  display: block;
  margin-top: 3px;
  color: rgba(160, 178, 191, 0.76);
  font-family: var(--font-data);
  font-size: 10px;
  line-height: 1;
}

@media (max-width: 1180px) {
  .footprint-summary {
    grid-template-columns: 1fr;
  }
}

.workspace-status .map-zoom-rig {
  grid-template-columns: auto 24px minmax(82px, 1fr) 24px 36px 42px !important;
  min-height: 32px !important;
  padding: 3px 5px !important;
  border-color: rgba(103, 215, 234, 0.26) !important;
  background: rgba(11, 27, 39, 0.58) !important;
}

.workspace-status .map-zoom-rig .icon-button,
.workspace-status .map-zoom-rig .hud-button,
.workspace-status .map-zoom-rig .telemetry-pill {
  min-height: 24px !important;
  height: 24px !important;
  border-radius: 8px !important;
}

.footer-actions {
  gap: 5px !important;
}

.footer-actions button {
  min-width: 48px !important;
  min-height: 28px !important;
  height: 28px !important;
  padding: 0 8px !important;
  opacity: 0.42 !important;
}

@media (max-width: 1180px) {
  .workspace-status {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 290px) auto !important;
  }

  .footer-selection {
    display: none !important;
  }
}

@media (max-width: 900px) {
  .workspace-status {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px) !important;
  }

  .footer-actions {
    display: none !important;
  }
}

/* Label hierarchy: big map identity wins; smaller operational tags move or fade. */
.entity.is-label-suppressed .entity-copy > strong,
.collab-cursor.is-label-suppressed .cursor-label {
  opacity: 0 !important;
  visibility: hidden !important;
}

.entity-copy > strong,
.cursor-label {
  transition:
    opacity 120ms ease,
    transform 120ms ease,
    visibility 120ms ease;
}

.entity-copy > strong {
  position: relative;
  z-index: 2;
}

.entity.label-callout-up .entity-copy::after,
.entity.label-callout-up-left .entity-copy::after,
.entity.label-callout-up-right .entity-copy::after {
  position: absolute;
  left: 50%;
  top: calc(50% - 31px);
  z-index: 1;
  width: 1px;
  height: 27px;
  border-left: 1px solid color-mix(in srgb, var(--entity-color), transparent 36%);
  content: "";
  opacity: 0.82;
  pointer-events: none;
}

.entity.label-callout-up-left .entity-copy::after {
  transform: rotate(-32deg);
  transform-origin: bottom center;
}

.entity.label-callout-up-right .entity-copy::after {
  transform: rotate(32deg);
  transform-origin: bottom center;
}

.entity.label-callout-up .entity-copy > strong,
.entity.label-callout-up-left .entity-copy > strong,
.entity.label-callout-up-right .entity-copy > strong {
  border-color: color-mix(in srgb, var(--entity-color), white 16%);
  background: rgba(4, 12, 20, 0.88);
  box-shadow: 0 0 12px color-mix(in srgb, var(--entity-color), transparent 78%);
  font-size: 10.5px !important;
  font-weight: 760;
}

.entity.label-callout-up .entity-copy > strong {
  transform: translateY(-42px);
}

.entity.label-callout-up-left .entity-copy > strong {
  transform: translate(-42px, -42px);
}

.entity.label-callout-up-right .entity-copy > strong {
  transform: translate(42px, -42px);
}

.entity.label-nudge-up .entity-copy > strong,
.collab-cursor.label-nudge-up .cursor-label {
  transform: translateY(-24px);
}

.entity.label-nudge-down .entity-copy > strong,
.collab-cursor.label-nudge-down .cursor-label {
  transform: translateY(24px);
}

.entity.label-nudge-left .entity-copy > strong,
.collab-cursor.label-nudge-left .cursor-label {
  transform: translateX(-34px);
}

.entity.label-nudge-right .entity-copy > strong,
.collab-cursor.label-nudge-right .cursor-label {
  transform: translateX(34px);
}

.entity.label-nudge-up-strong .entity-copy > strong,
.collab-cursor.label-nudge-up-strong .cursor-label {
  transform: translateY(-44px);
}

.entity.label-nudge-down-strong .entity-copy > strong,
.collab-cursor.label-nudge-down-strong .cursor-label {
  transform: translateY(44px);
}

.entity.label-nudge-left-strong .entity-copy > strong,
.collab-cursor.label-nudge-left-strong .cursor-label {
  transform: translateX(-58px);
}

.entity.label-nudge-right-strong .entity-copy > strong,
.collab-cursor.label-nudge-right-strong .cursor-label {
  transform: translateX(58px);
}

body[data-zoom-tier="overview"] .collab-cursor .cursor-label {
  max-width: 120px;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Softer, card-like inspection hierarchy. */
.visitor-bulletin {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.visitor-bulletin > div {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(145, 163, 178, 0.13);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(103, 215, 234, 0.055), transparent 72%),
    rgba(5, 12, 20, 0.5);
}

.visitor-bulletin span,
.visitor-card-header span,
.visitor-section h4 {
  color: rgba(160, 178, 191, 0.86);
  font-family: var(--font-data);
  font-size: 10px;
  letter-spacing: 0;
}

.visitor-bulletin strong {
  display: block;
  margin-top: 5px;
  color: rgba(239, 248, 252, 0.96);
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
}

.visitor-bulletin.compact strong {
  font-size: 19px;
}

.visitor-zone-card,
.visitor-section,
.visitor-card-header {
  display: grid;
  gap: 9px;
}

.visitor-zone-card {
  margin-top: 8px;
}

.visitor-card-header,
.visitor-section {
  padding: 12px;
  border: 1px solid rgba(145, 163, 178, 0.13);
  border-radius: 14px;
  background: rgba(5, 12, 20, 0.44);
}

.visitor-card-header strong {
  color: rgba(238, 248, 252, 0.94);
  font-family: var(--font-ui);
  font-size: 13px;
}

.visitor-section h4 {
  margin: 0;
  color: rgba(166, 216, 226, 0.78);
  font-size: 11px;
}

.visitor-section p {
  margin: 0;
  color: rgba(201, 216, 225, 0.78);
  font-size: 12px;
}

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

.visitor-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(145, 163, 178, 0.11);
  border-radius: 12px;
  background: rgba(2, 8, 15, 0.34);
  color: rgba(235, 246, 250, 0.92);
  text-align: left;
}

.visitor-row:hover {
  border-color: rgba(103, 215, 234, 0.34);
  background: rgba(9, 25, 36, 0.58);
}

.visitor-row strong,
.visitor-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visitor-row small {
  margin-top: 2px;
  color: rgba(162, 180, 192, 0.78);
  font-size: 11px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-color, var(--cyan));
  box-shadow: 0 0 10px color-mix(in srgb, var(--status-color, var(--cyan)), transparent 42%);
}

.inspection-utility-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 4px;
}

.inspection-utility-nav button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(145, 163, 178, 0.12);
  border-radius: 999px;
  background: rgba(2, 8, 15, 0.22);
  color: rgba(198, 215, 225, 0.74);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
}

.inspection-utility-nav button.is-active,
.inspection-utility-nav button:hover {
  border-color: rgba(103, 215, 234, 0.36);
  color: rgba(223, 247, 252, 0.94);
}

.settings-context {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
}

.settings-context summary {
  cursor: pointer;
  padding: 9px 11px;
  border: 1px solid rgba(145, 163, 178, 0.12);
  border-radius: 12px;
  background: rgba(2, 8, 15, 0.28);
  color: rgba(211, 228, 236, 0.86);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 750;
}

.settings-context-body {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

/* Footer: reference info recedes; zoom gets guaranteed space. */
.workspace-status {
  grid-template-columns: minmax(0, 1fr) minmax(390px, 420px) minmax(92px, 0.28fr) auto !important;
  overflow: visible !important;
}

.workspace-status .map-zoom-rig {
  grid-template-columns: 42px 38px minmax(132px, 1fr) 38px 54px 58px !important;
  min-width: 390px !important;
  gap: 6px !important;
  overflow: visible !important;
}

.workspace-status .map-zoom-rig > * {
  box-sizing: border-box !important;
}

.workspace-status .map-zoom-rig .zoom-label {
  min-width: 0 !important;
  width: 42px !important;
  padding: 0 !important;
}

.workspace-status .map-zoom-rig .icon-button {
  min-width: 38px !important;
  width: 38px !important;
}

.workspace-status .map-zoom-rig .hud-button {
  min-width: 54px !important;
  width: 54px !important;
}

.workspace-status .map-zoom-rig .telemetry-pill {
  min-width: 58px !important;
  width: 58px !important;
}

@media (max-width: 1180px) {
  .workspace-status {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 390px) auto !important;
  }
}

/* Inspector text should wrap deliberately, never trail with cut-off values. */
.right-panel .inspection-report {
  font-size: 13px;
  line-height: 1.35;
}

.right-panel .inspector-hero {
  gap: 8px;
}

.right-panel .inspector-hero > span {
  color: rgba(167, 185, 199, 0.9);
  font-size: 11px;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-transform: none;
}

.right-panel .inspector-hero h3 {
  font-size: clamp(22px, 1.45vw, 26px);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.right-panel .inspector-hero .hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 9px;
  align-items: center;
  color: rgba(194, 211, 222, 0.86);
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 1.25;
}

.right-panel .inspector-hero .hero-meta strong,
.right-panel .inspector-hero .hero-meta span {
  display: inline-flex;
  min-width: 0;
  margin: 0;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  overflow-wrap: anywhere;
  white-space: normal;
}

.right-panel .inspector-hero .hero-meta strong {
  color: var(--emerald);
  font-weight: 800;
}

.right-panel .footprint-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.right-panel .footprint-summary > div {
  padding: 10px 9px;
}

.right-panel .footprint-summary span,
.right-panel .footprint-summary small {
  overflow-wrap: anywhere;
  text-transform: none;
}

.right-panel .footprint-summary strong {
  font-size: 16px;
  overflow-wrap: anywhere;
}

.right-panel .sector-health.compact {
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 6px 8px;
}

.right-panel .sector-health.compact .health-bar {
  grid-column: 1 / -1;
  width: 100%;
}

.right-panel .sector-health.compact span,
.right-panel .sector-health.compact strong {
  min-width: 0;
  white-space: normal;
}

.right-panel .sector-health.compact strong {
  justify-self: end;
  font-size: 14px;
}

/* Bright aquatic HUD theme pass. */
:root {
  --bg: #0b6f8f;
  --panel: rgba(20, 87, 124, 0.76);
  --panel-strong: rgba(16, 68, 112, 0.86);
  --line: rgba(154, 230, 245, 0.34);
  --line-strong: rgba(214, 249, 255, 0.58);
  --text: #f5fbff;
  --muted: #b9d8e4;
  --cyan: #8df3ff;
  --violet: #b8c5ff;
  --amber: #ffd36a;
  --emerald: #9df7bf;
  --rose: #ff8fa7;
  --lime: #d9ff75;
}

body {
  background:
    radial-gradient(circle at 19% 21%, rgba(116, 237, 255, 0.3), transparent 31rem),
    radial-gradient(circle at 78% 10%, rgba(34, 151, 202, 0.36), transparent 30rem),
    radial-gradient(circle at 70% 86%, rgba(142, 246, 195, 0.18), transparent 31rem),
    linear-gradient(145deg, #25b8c9 0%, #0f83ad 34%, #134e86 68%, #13285b 100%);
}

body::after {
  background:
    linear-gradient(90deg, transparent, rgba(219, 255, 255, 0.045), transparent),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.028) 0,
      rgba(255, 255, 255, 0.028) 1px,
      transparent 1px,
      transparent 7px
    );
  mix-blend-mode: soft-light;
  opacity: 0.22;
}

.app-shell {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06), transparent 28%, rgba(141, 243, 255, 0.04)),
    radial-gradient(circle at 12% 88%, rgba(217, 255, 117, 0.1), transparent 24rem);
}

.workspace,
.map-controls,
.workspace-status,
.right-panel,
.side-panel {
  border-color: rgba(190, 245, 255, 0.38) !important;
}

.map-controls,
.workspace-status,
.right-panel,
.side-panel,
.panel-section,
.search-rig,
.header-layers-popover,
.context-popover,
.mini-map-module,
.inspection-report,
.inspection-context,
.inspector-hero,
.visitor-card-header,
.visitor-section,
.resource-panel,
.relationship-panel,
.notes-preview,
.status-summary,
.settings-context summary,
.settings-context-body,
.collab-row,
.support-ticket,
.chat-message,
.resource-row,
.task-row,
.sector-size-dialog .map-setup-inner,
.background-tool {
  background:
    linear-gradient(180deg, rgba(39, 119, 161, 0.78), rgba(19, 75, 125, 0.72)),
    rgba(23, 83, 130, 0.68) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    0 12px 34px rgba(11, 38, 78, 0.2) !important;
}

.map-controls,
.workspace-status {
  background:
    linear-gradient(90deg, rgba(126, 238, 255, 0.18), rgba(35, 105, 158, 0.72) 42%, rgba(26, 71, 131, 0.76)),
    rgba(25, 94, 145, 0.78) !important;
}

.right-panel,
.side-panel {
  background:
    linear-gradient(180deg, rgba(71, 168, 201, 0.38), rgba(24, 83, 136, 0.74) 42%, rgba(20, 56, 111, 0.82)),
    rgba(19, 72, 121, 0.78) !important;
}

.map-viewport {
  border-color: rgba(190, 247, 255, 0.56) !important;
  background:
    linear-gradient(135deg, rgba(142, 243, 255, 0.18), transparent 38%),
    linear-gradient(180deg, rgba(20, 108, 155, 0.52), rgba(14, 46, 92, 0.7)),
    #123f75 !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 0 80px rgba(113, 235, 255, 0.12),
    0 18px 48px rgba(8, 40, 83, 0.25) !important;
}

.map-surface {
  background-color: rgba(23, 91, 132, 0.52) !important;
  background-image:
    linear-gradient(rgba(182, 251, 255, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(182, 251, 255, 0.18) 1px, transparent 1px),
    linear-gradient(rgba(217, 255, 117, 0.32) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217, 255, 117, 0.32) 1px, transparent 1px) !important;
}

.map-surface::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035), transparent 22%, rgba(141, 243, 255, 0.045) 38%, transparent 66%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 8px) !important;
}

select,
input,
textarea,
.tool-mode,
.hud-button,
.icon-button,
.view-tab,
.saved-view,
.inspection-actions button,
.inspection-focus-nav button,
.inspection-utility-nav button,
.inspection-kpis button,
.workspace-status .footer-item,
.workspace-status button,
.workspace-status .telemetry-pill,
.workspace-status .map-zoom-rig,
.palette-item,
.layer-card,
.visitor-row,
.inspection-row,
.search-results button,
.search-empty {
  border-color: rgba(197, 247, 255, 0.28) !important;
  background: rgba(12, 64, 110, 0.54) !important;
  color: rgba(245, 252, 255, 0.94) !important;
}

select:focus,
input:focus,
textarea:focus,
.tool-mode.is-active,
.tool-mode:hover,
.hud-button:hover,
.icon-button:hover,
.inspection-focus-nav button.is-active,
.inspection-utility-nav button.is-active,
.inspection-kpis button.is-active,
.workspace-status .map-zoom-rig {
  border-color: rgba(223, 255, 255, 0.76) !important;
  background: rgba(89, 189, 220, 0.26) !important;
  box-shadow:
    inset 0 0 18px rgba(141, 243, 255, 0.14),
    0 0 16px rgba(141, 243, 255, 0.16) !important;
}

.tool-mode.is-active,
.view-tab.is-active,
.saved-view.is-active {
  color: #ffffff !important;
}

.brand-mark,
.presence-dot,
.resource-glyph,
.row-icon,
.mini-icon {
  box-shadow: 0 0 18px rgba(141, 243, 255, 0.2) !important;
}

.entity {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--entity-color), transparent 70%), rgba(21, 79, 128, 0.58)),
    color-mix(in srgb, var(--entity-color), transparent 84%) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 18px color-mix(in srgb, var(--entity-color), transparent 72%) !important;
}

.entity-copy,
.map-label-callout,
.search-results,
.road-label,
.mini-map-title {
  background: rgba(17, 68, 113, 0.76) !important;
  border-color: rgba(216, 250, 255, 0.28) !important;
  color: rgba(248, 253, 255, 0.96) !important;
}

.map-background,
.map-background-image {
  filter: saturate(1.08) brightness(1.1);
}

.health-bar,
.progress-bar {
  background: rgba(13, 56, 99, 0.66) !important;
}

.health-bar span,
.progress-bar span {
  background: linear-gradient(90deg, #d9ff75, #8df3ff) !important;
}

dialog::backdrop {
  background:
    linear-gradient(180deg, rgba(9, 63, 101, 0.28), rgba(6, 24, 68, 0.48)),
    rgba(6, 18, 54, 0.44) !important;
  backdrop-filter: blur(6px);
}

.background-dropzone,
.background-preview-panel,
.background-sidecar > div,
.background-controls,
.background-grid-hint,
.sector-size-calculator > div {
  background: rgba(18, 74, 120, 0.52) !important;
  border-color: rgba(197, 247, 255, 0.28) !important;
}

/* Tactical gadget rebalance: brighter than before, but with a field-HUD core. */
:root {
  --bg: #073f68;
  --panel: rgba(10, 53, 91, 0.84);
  --panel-strong: rgba(7, 39, 77, 0.9);
  --line: rgba(118, 232, 255, 0.42);
  --line-strong: rgba(209, 251, 255, 0.68);
  --text: #f3fbff;
  --muted: #abcddc;
  --cyan: #7df4ff;
  --violet: #9faeff;
  --amber: #ffd45f;
  --emerald: #8ff8b1;
  --rose: #ff819b;
  --lime: #d7ff5c;
}

body {
  background:
    radial-gradient(circle at 15% 19%, rgba(110, 241, 255, 0.24), transparent 28rem),
    radial-gradient(circle at 78% 8%, rgba(5, 148, 190, 0.24), transparent 29rem),
    radial-gradient(circle at 66% 84%, rgba(215, 255, 92, 0.12), transparent 27rem),
    linear-gradient(145deg, #18a9bd 0%, #0d6f9d 31%, #113d7a 67%, #121c52 100%);
}

body::after {
  background:
    linear-gradient(90deg, transparent 0%, rgba(157, 246, 255, 0.05) 48%, transparent 100%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.026) 0 1px, transparent 1px 6px),
    repeating-linear-gradient(90deg, rgba(126, 244, 255, 0.012) 0 1px, transparent 1px 18px);
  mix-blend-mode: screen;
  opacity: 0.24;
  animation: hud-scan-drift 9s linear infinite;
}

@keyframes hud-scan-drift {
  from {
    background-position: -18vw 0, 0 0, 0 0;
  }

  to {
    background-position: 118vw 0, 0 36px, 36px 0;
  }
}

.map-controls,
.workspace-status,
.right-panel,
.side-panel,
.panel-section,
.header-layers-popover,
.context-popover,
.mini-map-module,
.inspection-report,
.inspection-context,
.inspector-hero,
.visitor-card-header,
.visitor-section,
.resource-panel,
.relationship-panel,
.notes-preview,
.status-summary,
.settings-context summary,
.settings-context-body,
.collab-row,
.support-ticket,
.chat-message,
.resource-row,
.task-row,
.sector-size-dialog .map-setup-inner,
.background-tool {
  background:
    linear-gradient(180deg, rgba(22, 91, 132, 0.74), rgba(8, 48, 91, 0.84)),
    rgba(8, 48, 91, 0.82) !important;
  border-color: rgba(123, 236, 255, 0.36) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(126, 244, 255, 0.08),
    0 13px 34px rgba(6, 25, 67, 0.24) !important;
}

.map-controls,
.workspace-status {
  background:
    linear-gradient(90deg, rgba(126, 244, 255, 0.2), rgba(10, 78, 125, 0.86) 44%, rgba(13, 45, 104, 0.9)),
    rgba(9, 64, 111, 0.9) !important;
}

.right-panel,
.side-panel {
  background:
    linear-gradient(180deg, rgba(53, 151, 184, 0.32), rgba(10, 67, 116, 0.86) 38%, rgba(8, 38, 86, 0.92)),
    rgba(8, 50, 95, 0.9) !important;
}

.map-controls::after,
.right-panel::after,
.workspace-status::after {
  background:
    linear-gradient(90deg, transparent, rgba(126, 244, 255, 0.13), transparent),
    repeating-linear-gradient(0deg, transparent 0 18px, rgba(126, 244, 255, 0.03) 19px, transparent 20px) !important;
  opacity: 0.65;
  animation: hud-panel-sweep 7s ease-in-out infinite;
}

@keyframes hud-panel-sweep {
  0%,
  100% {
    background-position: -40vw 0, 0 0;
  }

  50% {
    background-position: 80vw 0, 0 12px;
  }
}

.map-viewport {
  background:
    linear-gradient(135deg, rgba(126, 244, 255, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(14, 81, 130, 0.58), rgba(7, 32, 76, 0.82)),
    #0b376f !important;
  border-color: rgba(195, 250, 255, 0.64) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 0 86px rgba(126, 244, 255, 0.1),
    0 18px 48px rgba(4, 21, 65, 0.3) !important;
}

.map-surface {
  background-color: rgba(16, 82, 123, 0.46) !important;
  background-image:
    linear-gradient(rgba(198, 252, 255, 0.19) 1px, transparent 1px),
    linear-gradient(90deg, rgba(198, 252, 255, 0.19) 1px, transparent 1px),
    linear-gradient(rgba(215, 255, 92, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(215, 255, 92, 0.28) 1px, transparent 1px) !important;
}

select,
input,
textarea,
.tool-mode,
.hud-button,
.icon-button,
.view-tab,
.saved-view,
.inspection-actions button,
.inspection-focus-nav button,
.inspection-utility-nav button,
.inspection-kpis button,
.workspace-status .footer-item,
.workspace-status button,
.workspace-status .telemetry-pill,
.workspace-status .map-zoom-rig,
.palette-item,
.layer-card,
.visitor-row,
.inspection-row,
.search-results button,
.search-empty {
  background: rgba(5, 40, 82, 0.62) !important;
  border-color: rgba(155, 240, 255, 0.34) !important;
  color: rgba(245, 252, 255, 0.96) !important;
}

.tool-mode.is-active,
.hud-button:hover,
.icon-button:hover,
.inspection-focus-nav button.is-active,
.inspection-utility-nav button.is-active,
.inspection-kpis button.is-active,
.workspace-status .map-zoom-rig,
.header-layers[open] summary,
.project-context-menu[open] summary {
  background:
    linear-gradient(180deg, rgba(70, 182, 215, 0.28), rgba(12, 75, 124, 0.76)),
    rgba(12, 75, 124, 0.78) !important;
  border-color: rgba(220, 255, 255, 0.86) !important;
  box-shadow:
    inset 0 0 16px rgba(126, 244, 255, 0.18),
    0 0 15px rgba(126, 244, 255, 0.18) !important;
}

.tool-mode.is-active::before,
.inspection-focus-nav button.is-active::before,
.inspection-utility-nav button.is-active::before {
  opacity: 0.95;
}

.brand-mark,
.tool-mode.is-active .mini-icon,
.status-pill,
.telemetry-pill,
.resource-glyph,
.row-icon,
.map-legend,
.mini-map-title {
  text-shadow: 0 0 10px rgba(126, 244, 255, 0.28);
}

.presence-dot {
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.16),
    0 0 18px color-mix(in srgb, var(--presence-color), transparent 45%) !important;
}

.entity {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--entity-color), transparent 68%), rgba(11, 49, 92, 0.66)),
    color-mix(in srgb, var(--entity-color), transparent 83%) !important;
  border-color: color-mix(in srgb, var(--entity-color), white 22%) !important;
}

.entity.is-selected {
  outline-color: var(--lime) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 0 4px rgba(215, 255, 92, 0.12),
    0 0 26px rgba(126, 244, 255, 0.2) !important;
}

.health-bar span,
.progress-bar span {
  background: linear-gradient(90deg, var(--lime), var(--emerald), var(--cyan)) !important;
  box-shadow: 0 0 12px rgba(215, 255, 92, 0.34);
}

.search-results,
.entity-copy,
.map-label-callout,
.road-label {
  background: rgba(5, 32, 72, 0.86) !important;
  border-color: rgba(199, 250, 255, 0.38) !important;
}

@media (prefers-reduced-motion: reduce) {
  body::after,
  .map-controls::after,
  .right-panel::after,
  .workspace-status::after {
    animation: none !important;
  }
}

/* Streamlined scanline HUD polish: fewer boxes, more device surface. */
body::after {
  background:
    linear-gradient(90deg, transparent 0%, rgba(160, 248, 255, 0.075) 48%, transparent 100%),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.06) 0,
      rgba(255, 255, 255, 0.06) 1px,
      rgba(4, 31, 70, 0.1) 1px,
      rgba(4, 31, 70, 0.1) 3px,
      transparent 3px,
      transparent 6px
    ),
    repeating-linear-gradient(90deg, rgba(126, 244, 255, 0.018) 0 1px, transparent 1px 18px) !important;
  opacity: 0.36 !important;
}

.map-viewport::after,
.right-panel::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  content: "";
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.05) 0,
      rgba(255, 255, 255, 0.05) 1px,
      transparent 1px,
      transparent 5px
    ),
    linear-gradient(90deg, transparent, rgba(126, 244, 255, 0.08), transparent);
  mix-blend-mode: screen;
  opacity: 0.32;
  animation: hud-panel-sweep 8s linear infinite;
}

.right-panel {
  position: relative;
}

.right-panel > *,
.map-surface,
.mini-map-module {
  position: relative;
  z-index: 3;
}

.map-controls,
.workspace-status,
.right-panel {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(126, 244, 255, 0.2) !important;
}

.control-row.tool-row,
.map-tool-palette,
.command-group,
.view-group,
.search-rig,
.tool-actions,
.zoom-rig,
.footer-meta,
.footer-selection,
.footer-actions {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.command-group {
  gap: 8px !important;
}

.command-group::before,
.command-group::after,
.panel-section::before,
.panel-section::after,
.map-controls::after,
.right-panel::after,
.workspace-status::after {
  box-shadow: none !important;
}

.tool-mode,
.hud-button,
.icon-button,
.inspection-actions button,
.inspection-focus-nav button,
.inspection-utility-nav button,
.workspace-status button,
.workspace-status .footer-item,
.workspace-status .telemetry-pill {
  border-width: 0 0 1px !important;
  border-radius: 0 !important;
  background:
    linear-gradient(180deg, rgba(126, 244, 255, 0.08), rgba(4, 33, 75, 0.18)) !important;
  box-shadow: inset 0 -1px 0 rgba(126, 244, 255, 0.22) !important;
}

.tool-mode {
  min-height: 44px !important;
  padding: 0 12px !important;
}

.tool-mode.is-active,
.hud-button:hover,
.icon-button:hover,
.inspection-actions button:hover,
.inspection-focus-nav button.is-active,
.inspection-utility-nav button.is-active {
  border-bottom-color: var(--lime) !important;
  background:
    linear-gradient(180deg, rgba(126, 244, 255, 0.18), rgba(8, 70, 118, 0.38)) !important;
  box-shadow:
    inset 0 -2px 0 var(--lime),
    0 0 16px rgba(126, 244, 255, 0.16) !important;
}

.tool-mode .mini-icon,
.header-layers-icon,
.context-summary-icon {
  border: 1px solid rgba(126, 244, 255, 0.44);
  background: rgba(126, 244, 255, 0.08);
}

.search-rig {
  grid-template-columns: minmax(0, 1fr) 52px !important;
  border-bottom: 1px solid rgba(126, 244, 255, 0.34) !important;
  flex: 0 1 250px !important;
  min-width: 180px !important;
  max-width: 250px !important;
  margin-right: 2px !important;
}

.search-rig input,
.search-rig .hud-button {
  background: rgba(5, 40, 82, 0.3) !important;
  border-width: 0 !important;
}

.search-rig .hud-button {
  min-width: 52px !important;
  width: 52px !important;
  padding: 0 !important;
  font-size: 11px !important;
}

.search-rig input {
  min-width: 0 !important;
}

.control-row.tool-row {
  overflow: hidden;
}

.right-panel .panel-section,
.inspection-report,
.inspection-context,
.visitor-card-header,
.visitor-section,
.resource-panel,
.relationship-panel,
.notes-preview,
.status-summary,
.settings-context summary,
.settings-context-body {
  border-width: 0 0 1px !important;
  border-radius: 0 !important;
  background: linear-gradient(180deg, rgba(126, 244, 255, 0.065), rgba(4, 33, 75, 0.08)) !important;
  box-shadow: none !important;
}

.inspector-hero,
.right-panel .inspector-hero {
  border: 0 !important;
  border-radius: 0 !important;
  background:
    linear-gradient(90deg, rgba(126, 244, 255, 0.16), transparent 72%),
    linear-gradient(180deg, rgba(3, 29, 68, 0.08), rgba(3, 29, 68, 0.22)) !important;
  box-shadow: inset 3px 0 0 rgba(126, 244, 255, 0.68) !important;
}

.visitor-bulletin,
.inspection-kpis,
.footprint-summary,
.inspection-meta {
  gap: 1px !important;
}

.visitor-bulletin > div,
.inspection-kpis button,
.footprint-summary > div,
.inspection-meta span {
  border: 0 !important;
  border-radius: 0 !important;
  background:
    linear-gradient(180deg, rgba(9, 70, 116, 0.48), rgba(4, 31, 70, 0.28)) !important;
  box-shadow: inset 0 1px 0 rgba(126, 244, 255, 0.14) !important;
}

.inspection-kpis button.is-active,
.inspection-kpis button:hover {
  box-shadow:
    inset 0 -2px 0 var(--lime),
    inset 0 1px 0 rgba(126, 244, 255, 0.18) !important;
}

.settings-context-body button,
.settings-context-body .settings-check {
  border-width: 0 0 1px !important;
  border-radius: 0 !important;
  background: rgba(4, 31, 70, 0.3) !important;
  box-shadow: none !important;
}

.mini-map-module {
  border-radius: 12px !important;
  background: rgba(5, 40, 82, 0.44) !important;
  backdrop-filter: blur(4px);
}

.mini-map-module.map-mini-overlay {
  position: absolute !important;
  right: 20px !important;
  bottom: 62px !important;
  z-index: 45 !important;
  display: grid !important;
  width: 168px !important;
  margin: 0 !important;
  padding: 9px !important;
  border-width: 1px !important;
  border-radius: 12px !important;
  background: rgba(5, 40, 82, 0.54) !important;
}

.map-viewport {
  border-radius: 10px !important;
}

.workspace-status {
  gap: 6px !important;
}

@media (prefers-reduced-motion: reduce) {
  .map-viewport::after,
  .right-panel::before {
    animation: none !important;
  }
}

/* Depth and clipping cleanup. */
.control-row.tool-row {
  overflow: visible !important;
  padding-top: 7px;
}

.map-controls {
  overflow: visible !important;
  padding-top: 14px !important;
  background:
    radial-gradient(circle at 16% 0%, rgba(126, 244, 255, 0.2), transparent 22rem),
    linear-gradient(90deg, rgba(10, 105, 146, 0.82), rgba(8, 60, 113, 0.9) 42%, rgba(11, 35, 95, 0.94)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(126, 244, 255, 0.34),
    0 10px 26px rgba(3, 20, 61, 0.28) !important;
}

.command-group-label {
  top: -4px !important;
  border: 0 !important;
  background: rgba(3, 26, 63, 0.82) !important;
  color: rgba(209, 247, 255, 0.9) !important;
  box-shadow: 0 0 10px rgba(126, 244, 255, 0.16) !important;
}

.workspace,
.map-stage,
.right-panel,
.workspace-status {
  isolation: isolate;
}

.map-stage::before,
.right-panel::before,
.workspace-status::before {
  position: absolute;
  pointer-events: none;
  content: "";
}

.map-stage::before {
  inset: 10px 10px 48px;
  z-index: 1;
  border-radius: 12px;
  background:
    radial-gradient(circle at 0% 0%, rgba(126, 244, 255, 0.11), transparent 24rem),
    linear-gradient(120deg, rgba(255, 255, 255, 0.04), transparent 34%, rgba(0, 0, 0, 0.1) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -42px 80px rgba(5, 18, 58, 0.34);
}

.map-viewport,
.ops-strip,
.mini-map-module {
  position: relative;
  z-index: 3;
}

.map-viewport {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -80px 120px rgba(4, 17, 59, 0.3),
    inset 0 0 0 1px rgba(126, 244, 255, 0.16),
    0 18px 42px rgba(3, 20, 61, 0.22) !important;
}

.right-panel {
  background:
    radial-gradient(circle at 18% 0%, rgba(126, 244, 255, 0.16), transparent 18rem),
    linear-gradient(180deg, rgba(18, 93, 134, 0.88), rgba(8, 51, 100, 0.9) 45%, rgba(8, 28, 76, 0.96)) !important;
  box-shadow:
    inset 1px 0 0 rgba(126, 244, 255, 0.34),
    inset 18px 0 42px rgba(126, 244, 255, 0.05),
    0 12px 34px rgba(3, 20, 61, 0.24) !important;
}

.right-panel::before {
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(126, 244, 255, 0.12), transparent 16%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 5px);
  opacity: 0.36;
}

.right-panel > * {
  position: relative;
  z-index: 3;
}

.right-panel .panel-section,
.inspection-report,
.inspection-context,
.settings-context-body {
  background:
    linear-gradient(180deg, rgba(126, 244, 255, 0.07), rgba(4, 33, 75, 0.16)) !important;
}

.inspector-hero,
.right-panel .inspector-hero {
  background:
    linear-gradient(90deg, rgba(126, 244, 255, 0.2), rgba(126, 244, 255, 0.04) 52%, transparent),
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(3, 29, 68, 0.24)) !important;
  box-shadow:
    inset 3px 0 0 rgba(126, 244, 255, 0.84),
    inset 0 -1px 0 rgba(126, 244, 255, 0.18) !important;
}

.visitor-bulletin > div,
.inspection-kpis button,
.footprint-summary > div,
.inspection-meta span {
  background:
    linear-gradient(180deg, rgba(19, 96, 139, 0.55), rgba(4, 31, 70, 0.38)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(126, 244, 255, 0.12) !important;
}

.workspace-status {
  overflow: visible !important;
  background:
    linear-gradient(90deg, rgba(15, 93, 133, 0.86), rgba(7, 52, 101, 0.92), rgba(10, 34, 91, 0.94)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 -10px 26px rgba(3, 20, 61, 0.22) !important;
}

.workspace-status .map-zoom-rig {
  background:
    linear-gradient(180deg, rgba(126, 244, 255, 0.16), rgba(5, 36, 82, 0.5)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -2px 0 rgba(126, 244, 255, 0.22),
    0 0 18px rgba(126, 244, 255, 0.1) !important;
}

.workspace-status .footer-item {
  background: rgba(4, 31, 70, 0.28) !important;
}

.search-rig {
  background:
    linear-gradient(180deg, rgba(8, 66, 113, 0.72), rgba(4, 30, 73, 0.58)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(126, 244, 255, 0.3) !important;
}

.search-rig input,
.search-rig .hud-button {
  min-height: 38px !important;
}

.header-layers summary {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(126, 244, 255, 0.24),
    0 0 14px rgba(126, 244, 255, 0.1) !important;
}

/* Integrated footer zoom control and slower vertical inspector scanlines. */
.workspace-status .map-zoom-rig {
  position: relative;
  isolation: isolate;
  display: grid !important;
  grid-template-columns: 42px 26px minmax(132px, 1fr) 30px 48px 48px !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 390px !important;
  min-height: 34px !important;
  padding: 3px 8px !important;
  overflow: hidden !important;
  border: 1px solid rgba(162, 244, 255, 0.54) !important;
  border-radius: 999px !important;
  background:
    linear-gradient(180deg, rgba(134, 244, 255, 0.18), rgba(7, 45, 92, 0.62)),
    rgba(4, 34, 80, 0.72) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(126, 244, 255, 0.32),
    0 0 18px rgba(126, 244, 255, 0.12) !important;
}

.workspace-status .map-zoom-rig::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(215, 255, 92, 0.12), transparent 18%, transparent 82%, rgba(126, 244, 255, 0.12)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 5px);
  opacity: 0.75;
}

.workspace-status .map-zoom-rig > * {
  position: relative;
  z-index: 1;
}

.workspace-status .map-zoom-rig .zoom-label,
.workspace-status .map-zoom-rig .icon-button,
.workspace-status .map-zoom-rig .hud-button,
.workspace-status .map-zoom-rig .telemetry-pill,
.workspace-status .map-zoom-rig input {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.workspace-status .map-zoom-rig .zoom-label {
  width: 42px !important;
  min-width: 42px !important;
  padding: 0 !important;
  color: rgba(223, 252, 255, 0.92) !important;
  font-size: 10px !important;
  letter-spacing: 0.02em;
  text-align: left;
  text-transform: uppercase;
}

.workspace-status .map-zoom-rig .icon-button,
.workspace-status .map-zoom-rig .hud-button {
  display: grid !important;
  min-width: 0 !important;
  width: auto !important;
  min-height: 26px !important;
  padding: 0 !important;
  place-items: center;
  color: rgba(236, 254, 255, 0.88) !important;
}

.workspace-status .map-zoom-rig .icon-button:hover,
.workspace-status .map-zoom-rig .hud-button:hover {
  color: var(--lime) !important;
  text-shadow: 0 0 10px rgba(215, 255, 92, 0.38);
}

.workspace-status .map-zoom-rig .hud-button {
  font-size: 10px !important;
  font-weight: 800;
  text-transform: uppercase;
}

.workspace-status .map-zoom-rig #zoomIn,
.workspace-status .map-zoom-rig #fitView,
.workspace-status .map-zoom-rig .telemetry-pill {
  border-left: 1px solid rgba(162, 244, 255, 0.22) !important;
}

.workspace-status .map-zoom-rig .telemetry-pill {
  display: grid !important;
  width: 48px !important;
  min-width: 48px !important;
  min-height: 26px !important;
  padding: 0 !important;
  place-items: center;
  color: rgba(215, 255, 92, 0.96) !important;
  font-family: var(--font-data);
  font-size: 10px !important;
}

.workspace-status .map-zoom-rig input[type="range"] {
  width: 100% !important;
  min-width: 0 !important;
  height: 18px !important;
  padding: 0 !important;
  appearance: none;
  accent-color: var(--cyan);
}

.workspace-status .map-zoom-rig input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(215, 255, 92, 0.42), rgba(126, 244, 255, 0.58)),
    rgba(3, 25, 61, 0.7);
  box-shadow: inset 0 0 0 1px rgba(3, 25, 61, 0.42);
}

.workspace-status .map-zoom-rig input[type="range"]::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -5px;
  appearance: none;
  border: 1px solid rgba(238, 255, 255, 0.88);
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(126, 244, 255, 0.5);
}

.workspace-status .map-zoom-rig input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(126, 244, 255, 0.5);
}

.workspace-status .map-zoom-rig input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 1px solid rgba(238, 255, 255, 0.88);
  border-radius: 50%;
  background: var(--cyan);
}

.right-panel::before {
  background:
    linear-gradient(180deg, transparent 0%, rgba(126, 244, 255, 0.13) 46%, transparent 100%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 6px) !important;
  opacity: 0.32;
  animation: right-panel-vertical-scan 34s linear infinite !important;
}

@keyframes right-panel-vertical-scan {
  from {
    background-position: 0 -120%, 0 0;
  }

  to {
    background-position: 0 120%, 0 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .right-panel::before {
    animation: none !important;
  }
}

/* Zoom rail bleed fix: keep footer status pill styling out of icon labels. */
.workspace-status .map-zoom-rig .icon-button span,
.workspace-status .map-zoom-rig .hud-button span {
  display: inline !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
  color: inherit !important;
  font: inherit !important;
}

.auth-locked {
  overflow: hidden;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(8, 15, 22, 0.94), rgba(12, 23, 30, 0.88)),
    radial-gradient(circle at 30% 20%, rgba(126, 244, 255, 0.12), transparent 34%),
    radial-gradient(circle at 76% 75%, rgba(240, 189, 104, 0.12), transparent 32%);
  backdrop-filter: blur(16px);
}

.auth-panel {
  width: min(420px, 100%);
  border: 1px solid rgba(201, 244, 255, 0.26);
  border-radius: 8px;
  padding: 24px;
  background: rgba(13, 22, 28, 0.96);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.auth-brand,
.auth-copy,
.auth-form {
  display: grid;
  gap: 12px;
}

.auth-brand {
  grid-template-columns: auto 1fr;
  align-items: center;
  margin-bottom: 18px;
  color: var(--text);
}

.auth-brand span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(126, 244, 255, 0.42);
  border-radius: 8px;
  color: var(--cyan);
  font-weight: 800;
}

.auth-copy {
  margin-bottom: 18px;
}

.auth-copy h1 {
  margin: 0;
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1.2;
}

.auth-copy p,
.auth-message {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.auth-form input {
  width: 100%;
}

.auth-form button {
  min-height: 42px;
  border: 1px solid rgba(126, 244, 255, 0.36);
  border-radius: 8px;
  background: rgba(126, 244, 255, 0.12);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.auth-form button:hover {
  background: rgba(126, 244, 255, 0.2);
}

.auth-form .auth-link-button {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.auth-session {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9000;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(520px, calc(100vw - 36px));
  padding: 8px;
  border: 1px solid rgba(201, 244, 255, 0.22);
  border-radius: 8px;
  background: rgba(8, 15, 22, 0.9);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.34);
}

.auth-session span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-session button {
  flex: 0 0 auto;
  min-height: 30px;
  border: 1px solid rgba(126, 244, 255, 0.28);
  border-radius: 8px;
  background: rgba(126, 244, 255, 0.1);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.admin-access-button {
  display: inline-grid;
  min-height: 24px;
  place-items: center;
  padding: 0 7px;
  border: 1px solid rgba(126, 244, 255, 0.32);
  border-radius: 999px;
  background: rgba(126, 244, 255, 0.08);
  color: var(--cyan);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.admin-access-button:hover {
  background: rgba(126, 244, 255, 0.16);
  color: var(--text);
}

@media (max-width: 640px) {
  .auth-gate {
    align-items: stretch;
    padding: 16px;
  }

  .auth-panel {
    align-self: center;
  }

  .auth-session {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }
}
