* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a0a0a;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: #e8e8e8;
}

#map {
  display: block;
  width: 100vw;
  height: 100vh;
  touch-action: none;
}

#writer {
  position: fixed;
  z-index: 10;
  background: #111;
  border: 1px solid #333;
  padding: 12px;
  width: 260px;
  max-width: calc(100vw - 32px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: inherit;
  color: #e8e8e8;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}

#writer[hidden] { display: none; }

.writer-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #888;
}

#writer-close {
  background: transparent;
  border: none;
  color: #888;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

#writer input,
#writer textarea {
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  color: #e8e8e8;
  padding: 6px 8px;
  font: inherit;
  font-size: 12px;
  resize: none;
  outline: none;
}

#writer input:focus,
#writer textarea:focus {
  border-color: #666;
}

#writer-submit {
  background: #e8e8e8;
  color: #0a0a0a;
  border: none;
  padding: 8px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

#writer-submit:hover { background: #fff; }

#camera-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

#camera-preview {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
}

#camera-preview[hidden] { display: none; }

#camera-snap { display: none; }

#camera-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border: 1px solid #444;
  border-radius: 4px;
}

#camera-thumb[hidden] { display: none; }

#camera-controls {
  display: flex;
  gap: 8px;
}

#camera-controls button {
  background: #222;
  color: #ccc;
  border: 1px solid #444;
  padding: 4px 10px;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

#camera-controls button:hover { border-color: #888; }
