:root {
  color-scheme: dark light;
  --bg: #0f172a;
  --bg-elevated: #111827;
  --border-subtle: #1f2937;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.15);
  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --danger: #f97373;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg);
  color: var(--text);
}

body {
  display: flex;
  flex-direction: column;
}

.app-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  background: linear-gradient(135deg, #020617, #0f172a);
}

.app-title {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
}

.app-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.app-main {
  flex: 1;
  display: flex;
  min-height: 0;
}

.map-container {
  flex: 2;
  min-width: 0;
  border-right: 1px solid var(--border-subtle);
}

#map {
  width: 100%;
  height: calc(100vh - 60px);
}

.info-panel {
  flex: 1;
  min-width: 260px;
  max-width: 400px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background-color: var(--bg-elevated);
}

.status-message {
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  background-color: var(--accent-soft);
  color: var(--accent);
  font-size: 0.85rem;
}

.status-message--error {
  background-color: rgba(248, 113, 113, 0.1);
  color: var(--danger);
}

.photo-preview-wrapper {
  flex: 1;
  min-height: 0;
  border-radius: 0.5rem;
  border: 1px solid var(--border-subtle);
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.1), transparent 55%),
    radial-gradient(circle at bottom right, rgba(96, 165, 250, 0.15), transparent 55%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.photo-preview {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0.35rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.9);
}

.photo-meta {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.photo-meta > div {
  display: grid;
  grid-template-columns: 80px 1fr;
  column-gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.photo-meta dt {
  font-weight: 600;
  color: var(--text);
}

.photo-meta dd {
  margin: 0;
  word-break: break-all;
}

@media (max-width: 800px) {
  .app-main {
    flex-direction: column;
  }

  .map-container {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  #map {
    height: 50vh;
  }

  .info-panel {
    max-width: none;
  }
}

