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

* {
  box-sizing: border-box;
}

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: 20;
}

.brand,
.top-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 14px;
}

.top-actions {
  gap: 10px;
}

.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 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: clamp(32px, 5vw, 56px);
  margin: 14px 0 10px;
}

.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;
}

.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.dragging {
  cursor: grabbing;
}

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

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

.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: 10;
}

#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.45);
  font-size: 10px;
  letter-spacing: 0.12em;
  pointer-events: none;
}

.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.74);
  opacity: 0.28;
  transition: opacity 0.18s ease;
}

.player-fullscreen:hover {
  opacity: 1;
}

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

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

@media (max-width: 780px) {
  .brand-subtitle {
    display: none;
  }

  .topbar {
    padding: 0 14px;
  }

  .button {
    padding: 11px 12px;
  }

  .map-toolbar {
    right: 12px;
    left: 12px;
    bottom: 12px;
    flex-wrap: wrap;
  }

  .interaction-hint {
    display: none;
  }
}
