:root {
  --bg: #0d0c0a;
  --panel: #171510;
  --panel-2: #211e17;
  --panel-3: #29251c;
  --gold: #c8a765;
  --gold-light: #e1c68a;
  --text: #f1eadc;
  --muted: #918a7c;
  --border: rgba(200, 167, 101, 0.28);
  --border-strong: rgba(200, 167, 101, 0.52);
}

* { box-sizing: border-box; }

/* The app relies heavily on the HTML hidden property. Author display rules
   otherwise override it (including map video/grid layers in Chromium). */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
}

body { overflow: hidden; }
body.player-mode { background: #000; }

.topbar {
  height: 76px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(13, 12, 10, 0.96);
  position: relative;
  z-index: 40;
}

.brand, .top-actions { display: flex; align-items: center; }
.brand { gap: 14px; }
.top-actions { gap: 10px; }

.top-actions > .button.secondary {
  height: 50px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
}

.map-box-cta {
  min-width: 210px;
  height: 50px;
  padding: 5px 12px 5px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--gold);
  border-radius: 9px;
  color: var(--gold-light);
  background:
    linear-gradient(180deg, rgba(200, 167, 101, 0.035), rgba(200, 167, 101, 0.01)),
    #090908;
  text-decoration: none;
  box-shadow:
    inset 0 0 0 1px rgba(225, 198, 138, 0.07),
    0 5px 14px rgba(0, 0, 0, 0.34);
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease;
}

.map-box-cta:hover {
  transform: translateY(-1px);
  border-color: var(--gold-light);
  background:
    linear-gradient(180deg, rgba(200, 167, 101, 0.08), rgba(200, 167, 101, 0.02)),
    #0b0a08;
  box-shadow:
    inset 0 0 0 1px rgba(225, 198, 138, 0.11),
    0 8px 22px rgba(0, 0, 0, 0.42),
    0 0 18px rgba(200, 167, 101, 0.08);
}

.map-box-cta-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  flex: 1;
}

.map-box-cta-copy small {
  font-family: Georgia, serif;
  font-size: 8px;
  letter-spacing: 0.24em;
  color: rgba(225, 198, 138, 0.82);
  margin-bottom: 4px;
  white-space: nowrap;
}

.map-box-cta-copy strong {
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.035em;
  white-space: nowrap;
}

.map-box-cta-arrow {
  font-family: Georgia, serif;
  font-size: 26px;
  line-height: 1;
  color: var(--gold-light);
  transform: translateY(-1px);
}


.brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid var(--gold);
  display: grid;
  place-items: center;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 24px;
}

.brand-title {
  font-family: Georgia, serif;
  letter-spacing: 0.16em;
  font-size: 17px;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace {
  width: 100%;
  height: calc(100vh - 76px);
  position: relative;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, #1b1812 0%, #0d0c0a 65%);
}

body.player-mode .workspace {
  height: 100vh;
  background: #000;
}

.welcome-panel {
  width: min(760px, calc(100% - 48px));
  text-align: center;
}

.eyebrow {
  color: var(--gold);
  letter-spacing: 0.24em;
  font-size: 11px;
  font-weight: 700;
}

h1 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: clamp(48px, 8vw, 92px);
  margin: 18px 0 14px;
  line-height: 0.94;
}

h2, h3 {
  font-family: Georgia, serif;
  font-weight: 400;
}

h2 {
  font-size: clamp(32px, 5vw, 56px);
  margin: 14px 0 10px;
}

h3 {
  margin: 3px 0 0;
  font-size: 25px;
}

.welcome-panel p, .player-waiting p {
  color: var(--muted);
  font-size: 16px;
}

.actions {
  margin-top: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.button, .player-fullscreen {
  border: 1px solid var(--gold);
  color: var(--gold-light);
  background: transparent;
  padding: 13px 18px;
  font-size: 12px;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.button:hover, .player-fullscreen:hover {
  background: rgba(200, 167, 101, 0.1);
}

.button.primary {
  background: var(--gold);
  color: #17130c;
  font-weight: 700;
}

.button.primary:hover { background: var(--gold-light); }
.button.small { padding: 8px 12px; font-size: 10px; }

.button.compact {
  padding: 9px 10px;
  font-size: 10px;
  flex: 1;
}

.button.active {
  background: rgba(200, 167, 101, 0.17);
  box-shadow: inset 0 0 0 1px rgba(225, 198, 138, 0.34);
}

.or { color: var(--muted); font-size: 12px; }

.drop-zone {
  border: 1px dashed var(--border);
  color: var(--muted);
  padding: 18px 26px;
  min-width: 220px;
  transition: 0.18s ease;
}

.drop-zone.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(200, 167, 101, 0.08);
  transform: scale(1.02);
}

.hint { margin-top: 28px; font-size: 11px !important; }

.map-stage {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #050505;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.map-stage.tool-reveal,
.map-stage.tool-hide { cursor: crosshair; }

.map-stage.dragging { cursor: grabbing; }

.map-world {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.map-world img,
.map-world video {
  display: block;
  max-width: none;
  max-height: none;
  pointer-events: none;
  user-select: none;
}

.map-video {
  object-fit: fill;
  background: #000;
}

.map-media-notice {
  position: absolute;
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  z-index: 28;
  width: min(520px, calc(100% - 36px));
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: rgba(13, 12, 10, 0.96);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.58);
  color: var(--text);
}

.map-media-notice strong {
  color: var(--gold-light);
  font-family: Georgia, serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.map-media-notice span {
  flex: 1;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.map-media-notice .button {
  flex: 0 0 auto;
}

.fog-canvas {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  pointer-events: none;
  opacity: 0.58;
}

body.player-mode .fog-canvas { opacity: 1; }

.map-toolbar {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(13, 12, 10, 0.88);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
  z-index: 22;
}

#mapName {
  font-size: 12px;
  color: var(--text);
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zoom-readout {
  color: var(--gold-light);
  min-width: 48px;
  text-align: center;
  font-size: 11px;
}

.interaction-hint {
  position: absolute;
  right: 18px;
  bottom: 18px;
  color: rgba(241, 234, 220, 0.42);
  font-size: 10px;
  letter-spacing: 0.12em;
  pointer-events: none;
  z-index: 5;
}

.tool-rail {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rail-button {
  width: 48px;
  min-height: 48px;
  border: 1px solid var(--border);
  background: rgba(13, 12, 10, 0.9);
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.11em;
  cursor: pointer;
  writing-mode: horizontal-tb;
}

.rail-button:hover {
  border-color: var(--border-strong);
  color: var(--gold-light);
  background: rgba(40, 35, 25, 0.96);
}

.rail-button.active {
  border-color: var(--gold-light);
  color: #f7e5b8;
  background: rgba(74, 60, 31, 0.98);
  box-shadow:
    inset 0 0 0 1px rgba(225, 198, 138, 0.30),
    0 0 10px rgba(225, 198, 138, 0.38),
    0 0 22px rgba(200, 167, 101, 0.16);
}

.tool-panel {
  position: absolute;
  left: 68px;
  top: 12px;
  bottom: 12px;
  transform: none;
  width: 270px;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  z-index: 29;
  background: rgba(17, 15, 11, 0.96);
  border: 1px solid var(--border);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(10px);
}

.tool-panel.collapsed { display: none; }

.tool-panel-section { padding: 13px; }

.tool-panel-section h3 {
  font-size: 22px;
}

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

.tool-panel-kicker,
.tool-label {
  color: var(--gold);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.panel-close {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.panel-close:hover {
  color: var(--gold-light);
  border-color: var(--border-strong);
}

.tool-panel-block {
  padding: 10px 0;
  border-bottom: 1px solid rgba(200, 167, 101, 0.14);
}

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

.segmented-controls {
  display: flex;
  gap: 6px;
  margin-top: 7px;
}

.tool-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.value-readout {
  color: var(--text);
  font-size: 10px;
}

.panel-slider {
  width: 100%;
  accent-color: var(--gold);
}

.tool-help {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.tool-panel .button.compact {
  padding: 7px 8px;
  font-size: 9px;
}

.tool-panel .panel-button {
  padding: 9px 10px;
  font-size: 10px;
}

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

.panel-button {
  width: 100%;
  text-align: center;
}

/* Keep destructive/clear controls reachable even on short laptop screens. */
#fogPanel .panel-actions,
#rulerPanel .panel-actions {
  position: sticky;
  bottom: -13px;
  z-index: 4;
  margin: 0 -13px -13px;
  padding: 9px 13px 13px;
  background: linear-gradient(
    to bottom,
    rgba(17, 15, 11, 0.72),
    rgba(17, 15, 11, 0.99) 28%
  );
  border-top: 1px solid rgba(200, 167, 101, 0.16);
}

.danger-soft {
  border-color: rgba(179, 90, 73, 0.68);
  color: #d8aaa0;
}

.coming-next {
  margin-top: 16px;
  padding: 22px 16px;
  text-align: center;
  border: 1px dashed var(--border);
  color: var(--muted);
}

.coming-next-icon {
  color: var(--gold);
  font-size: 30px;
  margin-bottom: 10px;
}

.coming-next strong {
  display: block;
  color: var(--text);
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 400;
}

.coming-next p {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.55;
}

.brush-preview {
  position: absolute;
  left: 0;
  top: 0;
  border: 1.5px solid rgba(225, 198, 138, 0.98);
  border-radius: 50%;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.8),
    0 0 10px rgba(225, 198, 138, 0.35);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 24;
}

.laser-pointer {
  position: absolute;
  left: 0;
  top: 0;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 240, 240, 0.95);
  background: radial-gradient(circle at center, rgba(255, 70, 70, 0.95) 0%, rgba(255, 50, 50, 0.88) 38%, rgba(255, 0, 0, 0.18) 72%, rgba(255, 0, 0, 0) 100%);
  box-shadow:
    0 0 4px rgba(255, 30, 30, 0.95),
    0 0 10px rgba(255, 30, 30, 0.55),
    0 0 17px rgba(255, 30, 30, 0.3);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 25;
}

.player-waiting {
  text-align: center;
  width: min(680px, calc(100% - 48px));
}

.player-fullscreen {
  position: absolute;
  right: 18px;
  top: 18px;
  z-index: 30;
  background: rgba(13, 12, 10, 0.94);
  border-color: var(--gold-light);
  color: #f7e5b8;
  opacity: 1;
  border-radius: 8px;
  box-shadow:
    0 0 0 1px rgba(225, 198, 138, 0.14),
    0 8px 24px rgba(0, 0, 0, 0.48);
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.player-fullscreen:hover {
  background: rgba(200, 167, 101, 0.18);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(225, 198, 138, 0.28),
    0 10px 30px rgba(0, 0, 0, 0.58);
}

body:not(.player-mode) .laser-pointer { display: none !important; }

body.player-mode #topbar,
body.player-mode #mapToolbar,
body.player-mode #interactionHint,
body.player-mode #toolRail,
body.player-mode #toolPanel,
body.player-mode #brushPreview {
  display: none !important;
}

body.player-mode .map-stage { cursor: default; }

@media (max-width: 980px) {
  .brand-subtitle { display: none; }
  .topbar { padding: 0 14px; }
  .button { padding: 11px 12px; }

  .tool-panel {
    width: 248px;
    left: 64px;
  }

  .tool-rail { left: 9px; }

  .rail-button {
    width: 44px;
    min-height: 44px;
  }

  .map-toolbar {
    left: 12px;
    bottom: 12px;
    flex-wrap: wrap;
    max-width: calc(100% - 24px);
  }

  .interaction-hint { display: none; }
}


@media (max-height: 760px) {
  .tool-panel {
    top: 8px;
    bottom: 8px;
    width: 248px;
    left: 62px;
  }

  .tool-panel-section { padding: 10px; }
  .tool-panel-section h3 { font-size: 19px; }
  .tool-panel-header { padding-bottom: 7px; }
  .tool-panel-block { padding: 7px 0; }
  .segmented-controls { margin-top: 5px; gap: 5px; }
  .tool-label-row { margin-bottom: 5px; }
  .tool-help { margin-top: 5px; font-size: 9px; line-height: 1.25; }

  .tool-panel .button.compact {
    padding: 6px 6px;
    font-size: 8px;
  }

  .tool-panel .panel-button {
    padding: 7px 8px;
    font-size: 9px;
  }

  #fogPanel .panel-actions,
  #rulerPanel .panel-actions {
    bottom: -10px;
    margin: 0 -10px -10px;
    padding: 7px 10px 10px;
  }

  .rail-button {
    width: 42px;
    min-height: 42px;
  }

  .tool-rail {
    left: 8px;
    gap: 5px;
  }
}


/* v0.5 — fog shapes and full Project Atlas ruler */
.map-stage.tool-ruler { cursor: crosshair; }

.screen-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.fog-shape-preview { z-index: 23; }
.ruler-overlay { z-index: 24; }

.fog-preview-shape {
  fill: rgba(225, 198, 138, 0.10);
  stroke: rgba(225, 198, 138, 0.96);
  stroke-width: 2;
  stroke-dasharray: 7 5;
}

.segmented-controls { display: grid; gap: 7px; }
.segmented-controls.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.segmented-controls.three-up { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.ruler-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.button.compact { min-height: 36px; }
.tool-help.calibrating { color: var(--gold-light); }

.ruler-line {
  fill: none;
  stroke: #e1c68a;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.9));
}
.ruler-fill {
  fill: rgba(225, 198, 138, 0.18);
  stroke: #e1c68a;
  stroke-width: 2;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.9));
}
.ruler-point {
  fill: #17130c;
  stroke: #e1c68a;
  stroke-width: 2;
}
.ruler-label-bg {
  fill: rgba(13, 12, 10, 0.92);
  stroke: rgba(200, 167, 101, 0.65);
  stroke-width: 1;
}
.ruler-label,
.ruler-total-label {
  fill: #f1eadc;
  font: 700 12px Inter, Arial, sans-serif;
  dominant-baseline: middle;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(0,0,0,.9);
  stroke-width: 3px;
  stroke-linejoin: round;
}
.ruler-total-label { fill: #e1c68a; font-size: 13px; }
.calibration-line {
  stroke: #e1c68a;
  stroke-width: 2;
  stroke-dasharray: 8 6;
}
.calibration-grid {
  fill: none;
  stroke: rgba(225, 198, 138, 0.82);
  stroke-width: 1.4;
  stroke-dasharray: 5 4;
}
body.player-mode #fogShapePreview { display: none !important; }


/* v0.6 — grid tool, fog icons and calibration sharing */
.grid-canvas {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  pointer-events: none;
  z-index: 3;
}

.fog-canvas { z-index: 2; }

.shape-button,
#gridSquare,
#gridHex {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.shape-icon {
  position: relative;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  display: inline-block;
}

.square-icon {
  border: 1.5px solid currentColor;
}

.circle-icon {
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.brush-icon {
  transform: rotate(-35deg);
}

.brush-icon::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 0;
  width: 4px;
  height: 9px;
  border: 1.5px solid currentColor;
  border-radius: 2px 2px 0 0;
}

.brush-icon::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 8px;
  width: 8px;
  height: 5px;
  background: currentColor;
  clip-path: polygon(15% 0, 85% 0, 100% 100%, 0 100%);
}

.mini-grid-icon {
  width: 13px;
  height: 13px;
  display: inline-block;
  flex: 0 0 13px;
}

.square-grid-icon {
  border: 1px solid currentColor;
  background:
    linear-gradient(to right, transparent 46%, currentColor 47%, currentColor 53%, transparent 54%),
    linear-gradient(to bottom, transparent 46%, currentColor 47%, currentColor 53%, transparent 54%);
}

.hex-text-icon {
  font-size: 17px;
  line-height: 1;
}

#gridToggle.active {
  background: rgba(200, 167, 101, 0.17);
  box-shadow: inset 0 0 0 1px rgba(225, 198, 138, 0.34);
}


/* v0.7 — Dawk Maps Lite branding + splash artwork + polygon ruler */
.welcome-panel {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  max-width: none;
  background-image:
    linear-gradient(to bottom, rgba(8, 7, 5, 0.05) 0%, rgba(8, 7, 5, 0.02) 54%, rgba(8, 7, 5, 0.34) 76%, rgba(8, 7, 5, 0.76) 100%),
    var(--welcome-art);
  /* Pull the Dawk Maps crest upward so it sits above the Lite/menu stack. */
  background-position: center calc(50% - 90px);
  background-size: cover;
  background-repeat: no-repeat;
  overflow: hidden;
}

.welcome-branding {
  position: absolute;
  left: 50%;
  top: 64%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  text-shadow: 0 3px 18px rgba(0,0,0,.96);
}

.welcome-lite-title {
  color: var(--gold-light);
  font-family: Georgia, serif;
  font-size: clamp(21px, 2.2vw, 36px);
  letter-spacing: .42em;
  padding-left: .42em;
}

.welcome-tagline {
  margin-top: 7px;
  color: rgba(225, 198, 138, .82);
  font-family: Georgia, serif;
  font-size: clamp(8px, .75vw, 12px);
  letter-spacing: .31em;
  padding-left: .31em;
}

.welcome-menu {
  position: absolute;
  left: 50%;
  top: 75%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  width: min(690px, calc(100% - 32px));
  padding: 12px 16px;
}

.welcome-open-button {
  min-width: 164px;
  box-shadow: 0 8px 28px rgba(0,0,0,.52);
}

.welcome-drop-zone {
  min-width: 235px;
  background: rgba(8, 7, 5, .58);
  border-color: rgba(225, 198, 138, .54);
  backdrop-filter: blur(4px);
  box-shadow: 0 8px 28px rgba(0,0,0,.38);
}

.welcome-hint {
  position: absolute;
  left: 50%;
  top: 88%;
  transform: translateX(-50%);
  margin: 0 !important;
  width: min(620px, calc(100% - 30px));
  color: rgba(225, 198, 138, .58) !important;
  font-size: 10px !important;
  letter-spacing: .03em;
  text-shadow: 0 2px 7px #000;
}

.polygon-icon {
  width: 15px;
  height: 15px;
  display: inline-block;
  clip-path: polygon(50% 0%, 100% 38%, 80% 100%, 20% 100%, 0% 38%);
  background: currentColor;
  position: relative;
}

.polygon-icon::after {
  content: "";
  position: absolute;
  inset: 2px;
  clip-path: inherit;
  background: #171510;
}


@media (max-width: 780px) {
  .welcome-panel { background-position: center calc(50% - 54px); }
  .welcome-branding { top: 61%; }
  .welcome-menu { top: 72%; }
  .welcome-hint { top: 90%; }
}



/* Compact in-app chrome — preserve maximum room for the battle map. */
body:not(.map-box-page) .topbar {
  height: 50px;
  padding: 0 16px;
}

body:not(.map-box-page) .workspace {
  height: calc(100vh - 50px);
}

body:not(.map-box-page) .brand {
  gap: 9px;
}

body:not(.map-box-page) .brand-mark {
  width: 30px;
  height: 30px;
  font-size: 17px;
}

body:not(.map-box-page) .brand-title {
  font-size: 13px;
  letter-spacing: 0.14em;
}

body:not(.map-box-page) .brand-subtitle {
  margin-top: 1px;
  font-size: 8px;
}

body:not(.map-box-page) .top-actions {
  gap: 6px;
}

body:not(.map-box-page) .top-actions > .button.secondary {
  height: 34px;
  padding: 0 14px;
  border-radius: 6px;
  font-size: 9px;
}

body:not(.map-box-page) .map-box-cta {
  min-width: 152px;
  height: 34px;
  padding: 3px 8px 3px 10px;
  gap: 7px;
  border-radius: 6px;
}

body:not(.map-box-page) .map-box-cta-copy small {
  margin-bottom: 2px;
  font-size: 5.5px;
  letter-spacing: 0.20em;
}

body:not(.map-box-page) .map-box-cta-copy strong {
  font-size: 12px;
}

body:not(.map-box-page) .map-box-cta-arrow {
  font-size: 18px;
}

.map-toolbar {
  left: 9px;
  bottom: 9px;
  gap: 5px;
  padding: 5px 6px;
}

.map-toolbar #mapName {
  max-width: 180px;
  font-size: 9px;
}

.map-toolbar .zoom-readout {
  min-width: 34px;
  font-size: 9px;
}

.map-toolbar .button.small {
  padding: 5px 8px;
  font-size: 8px;
  letter-spacing: 0.09em;
}

.player-fullscreen {
  right: 9px;
  top: 9px;
  padding: 7px 10px;
  font-size: 9px;
  letter-spacing: 0.10em;
  border-radius: 5px;
  box-shadow:
    0 0 0 1px rgba(225, 198, 138, 0.10),
    0 4px 12px rgba(0, 0, 0, 0.42);
}

.player-fullscreen:hover {
  box-shadow:
    0 0 0 1px rgba(225, 198, 138, 0.22),
    0 5px 15px rgba(0, 0, 0, 0.52);
}

/* Dawk Map Box enquiry / showcase page */
body.map-box-page {
  overflow-y: auto;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 16%, rgba(200, 167, 101, 0.055), transparent 34%),
    #0d0c0a;
}

/* Match the compact Atlas Lite header exactly in scale and spacing. */
.map-box-page .topbar {
  position: sticky;
  top: 0;
  height: 50px;
  padding: 0 16px;
  z-index: 40;
}

.map-box-page .brand {
  gap: 9px;
}

.map-box-page .brand-mark {
  width: 30px;
  height: 30px;
  font-size: 17px;
}

.map-box-page .top-actions {
  gap: 6px;
}

.map-box-page .top-actions > .button.secondary {
  height: 34px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 9px;
  text-decoration: none;
}

.map-box-header-wordmark {
  display: block;
  width: 188px;
  height: auto;
  max-width: 34vw;
}

.map-box-back,
.map-box-back:visited,
.map-box-back:hover,
.map-box-back:active {
  color: inherit;
  text-decoration: none;
}

.map-box-page-shell {
  width: min(1320px, calc(100% - 28px));
  margin: 0 auto;
  padding: 14px 0 42px;
}

/* Centred branded enquiry artwork. */
.map-box-enquiry-panel {
  min-height: 210px;
  margin: 0 0 8px;
  padding: 10px 18px;
  border: 1px solid rgba(200, 167, 101, 0.30);
  background:
    radial-gradient(circle at 50% 45%, rgba(200, 167, 101, 0.055), transparent 42%),
    linear-gradient(135deg, rgba(200, 167, 101, 0.025), transparent 48%),
    rgba(15, 13, 10, 0.92);
  display: grid;
  place-items: center;
  box-shadow:
    inset 0 0 0 1px rgba(225, 198, 138, 0.04),
    0 10px 28px rgba(0, 0, 0, 0.20);
}

.map-box-enquiry-art {
  display: block;
  width: min(975px, 92%);
  max-width: 975px;
  max-height: 198px;
  object-fit: contain;
  object-position: center;
  justify-self: center;
}

.map-box-enquiry-fallback {
  width: fit-content;
  max-width: calc(100% - 24px);
  margin: 0 auto 12px;
  padding: 8px 10px;
  border: 1px solid rgba(200, 167, 101, 0.34);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(13, 12, 10, 0.97);
  box-shadow:
    inset 0 0 0 1px rgba(225, 198, 138, 0.035),
    0 8px 22px rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-align: center;
}

.map-box-enquiry-fallback-action {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(200, 167, 101, 0.62);
  border-radius: 5px;
  color: var(--gold-light);
  background: rgba(200, 167, 101, 0.055);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.map-box-enquiry-fallback-action:hover,
.map-box-enquiry-fallback-action:focus-visible {
  border-color: var(--gold-light);
  color: #fff0be;
  background: rgba(200, 167, 101, 0.12);
  box-shadow: 0 0 12px rgba(225, 198, 138, 0.18);
  outline: none;
}

.map-box-enquiry-feedback {
  color: var(--gold-light);
}
/* Showcase carousel. */
.map-box-carousel {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 92px;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(200, 167, 101, 0.24);
  background:
    linear-gradient(180deg, rgba(200, 167, 101, 0.025), transparent 36%),
    #0c0b09;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.30);
}

.map-box-media-stage {
  min-width: 0;
  min-height: clamp(360px, 62vh, 720px);
  border: 1px solid rgba(200, 167, 101, 0.18);
  background: #090806;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.map-box-media-host {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 14px;
}

.map-box-media-host img,
.map-box-media-host video {
  display: block;
  max-width: 100%;
  max-height: min(68vh, 700px);
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid rgba(200, 167, 101, 0.16);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

.map-box-carousel-button {
  appearance: none;
  width: 92px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0.96;
  transition: transform 0.16s ease, opacity 0.16s ease, filter 0.16s ease;
}

.map-box-carousel-button img {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  box-shadow: none;
  pointer-events: none;
}

.map-box-carousel-button:hover:not(:disabled) {
  transform: scale(1.045);
  filter: brightness(1.08);
}

.map-box-carousel-button:active:not(:disabled) {
  transform: scale(0.98);
}

.map-box-carousel-button-right img {
  transform: rotate(180deg);
}

.map-box-carousel-button:disabled {
  opacity: 0.34;
  cursor: default;
  filter: saturate(0.55);
}

@media (max-width: 900px) {
  .map-box-enquiry-panel {
    min-height: 176px;
    padding-inline: 12px;
  }

  .map-box-enquiry-art {
    width: min(780px, 94%);
    max-width: 780px;
    max-height: 160px;
  }

  .map-box-carousel {
    grid-template-columns: 64px minmax(0, 1fr) 64px;
    gap: 8px;
  }

  .map-box-carousel-button {
    width: 64px;
  }
}

@media (max-width: 650px) {
  .map-box-page .topbar {
    padding: 0 10px;
  }

  .map-box-header-wordmark {
    width: 148px;
    max-width: 44vw;
  }

  .map-box-page-shell {
    width: min(100% - 16px, 1320px);
    padding-top: 8px;
  }

  .map-box-enquiry-panel {
    min-height: 150px;
    padding: 8px;
  }

  .map-box-enquiry-art {
    width: 100%;
    max-width: 620px;
    max-height: 140px;
    object-position: center;
  }

  .map-box-enquiry-fallback {
    width: calc(100% - 8px);
    max-width: none;
  }

  .map-box-carousel {
    grid-template-columns: 46px minmax(0, 1fr) 46px;
    gap: 4px;
    padding: 6px;
  }

  .map-box-carousel-button {
    width: 46px;
  }

  .map-box-media-stage {
    min-height: 300px;
  }

  .map-box-media-host {
    padding: 6px;
  }
}
