:root {
  color-scheme: light dark;
  --bg: #f5f5f5;
  --bg-elevated: #ffffff;
  --border: rgba(0, 0, 0, 0.08);
  --text: #131313;
  --text-soft: rgba(19, 19, 19, 0.68);
  --accent: #3f7dfd;
  --accent-soft: rgba(63, 125, 253, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111318;
    --bg-elevated: #181c24;
    --border: rgba(255, 255, 255, 0.08);
    --text: #f6f7fa;
    --text-soft: rgba(246, 247, 250, 0.68);
    --accent: #5f8bff;
    --accent-soft: rgba(95, 139, 255, 0.16);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    'Inter',
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: var(--bg);
  color: var(--text);
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
}

header {
  padding: 1.5rem 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

header p {
  margin: 0;
  color: var(--text-soft);
}

.info {
  margin: 0;
}
@media (prefers-color-scheme: dark) {
  .info > img {
    filter: invert(100%);
  }
}

main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 1.5rem 2rem 2rem;
  flex: 1;
}

.stage-wrapper {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-soft);
  font-size: 1.4rem;
  margin: 0 auto;
}

.stage-header p {
  margin: 0;
  padding: 0;
}

.stage {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 320px;
  border-radius: 0.875rem;
  border: 2px dashed var(--border);
  background: repeating-linear-gradient(
    45deg,
    var(--accent-soft),
    var(--accent-soft) 6px,
    transparent 6px,
    transparent 12px
  );
  display: grid;
  place-items: center;
  overflow: hidden;
  outline: none;
  /* touch-action: none; */
}

.stage:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(63, 125, 253, 0.12);
}

#map-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* pointer-events: none; */
}
