:root {
  --accent: #ff6a3d;
  --accent-fill: rgba(255, 106, 61, 0.28);
  --accent-stroke: #e8551f;
  --ink: #1b1f24;
  --paper: #ffffff;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

#app-header {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid #e2e2e2;
}

#app-header h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

#app-sub {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  color: #666;
}

#map {
  position: absolute;
  top: 58px;
  left: 0;
  right: 0;
  bottom: 0;
}

#load-error {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff3f0;
  border: 1px solid var(--accent-stroke);
  color: #7a2b12;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  max-width: 90vw;
}

.hidden { display: none !important; }

/* Modal */
#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 15, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 2rem 1rem;
}

#modal {
  position: relative;
  background: var(--paper);
  border-radius: 10px;
  max-width: min(960px, 96vw);
  max-height: 92vh;
  overflow: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
}

#modal-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 72vh;
  object-fit: contain;
  background: #111;
}

#modal-meta {
  padding: 0.9rem 1.1rem 1.1rem;
}

#modal-filename {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
  word-break: break-word;
}

#modal-details {
  font-size: 0.85rem;
  color: #555;
  line-height: 1.5;
}

#modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.6rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

#modal-close:hover {
  background: rgba(0, 0, 0, 0.8);
}
