:root {
  --bg: #f8f6ef;
  --panel: #fffdf6;
  --panel-border: #dbd3bf;
  --ink: #1f2a2d;
  --muted: #5c686b;
  --ok: #1f8a58;
  --warn: #9b2f2f;
  --accent: #b66c24;
  --accent-strong: #8f4f12;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Rubik, "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 100% 0%, #fff9e8 0%, var(--bg) 55%);
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(320px, 430px) 1fr;
  min-height: 100vh;
}

.panel {
  padding: 1rem 1.25rem 1.25rem;
  background: var(--panel);
  border-inline-start: 1px solid var(--panel-border);
}

h1 {
  margin: 0;
  font-size: 1.85rem;
}

.subtitle {
  margin: 0.5rem 0 1rem;
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stats > div {
  background: #fff;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 0.65rem;
}

.label {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.value {
  font-weight: 800;
  font-size: 1.4rem;
}

.cookie-consent {
  margin-bottom: 0.9rem;
  padding: 0.7rem;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  background: #fff;
}

.cookie-consent p {
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.cookie-consent button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.cookie-consent button:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.cookie-consent[hidden] {
  display: none;
}

.answer-form {
  display: grid;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  flex-shrink: 0;
}

.answer-form input {
  border-radius: 10px;
  border: 1px solid #b8b8b8;
  padding: 0.75rem;
  font: inherit;
}

.answer-form input:focus {
  outline: 2px solid #f5c687;
  border-color: var(--accent);
}

.status {
  min-height: 1.5rem;
  margin: 0.8rem 0;
  font-weight: 500;
}

.status.ok {
  color: var(--ok);
}

.status.warn {
  color: var(--warn);
}

.badge-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.25rem 0 0;
}

.badge {
  background: linear-gradient(135deg, #fff8e8 0%, #fdedb7 100%);
  border: 1px solid #c9943a;
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #7a4f00;
}

.about {
  margin-top: 0.8rem;
  color: var(--muted);
}

.about ul {
  margin: 0.5rem 0 0;
  padding-inline-start: 1rem;
}

.map-wrap {
  grid-column: 2;
  grid-row: 1 / -1;
  min-height: 100vh;
  position: relative;
}

#map {
  width: 100%;
  height: 100%;
  background: #eef1ec;
}

.found-list-wrap {
  position: absolute;
  bottom: 0;
  right: 0;
  z-index: 1000;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  margin: 1rem;
  max-width: 500px;
  pointer-events: auto;
}

.street-label {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 2px 6px;
  font-family: Rubik, "Segoe UI", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  pointer-events: none;
}
.street-label::before { display: none; }

@media (max-width: 900px) {
  .app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
  }

  .panel {
    flex-shrink: 0;
    border-inline-start: none;
    border-bottom: 1px solid var(--panel-border);
  }

  .map-wrap {
    flex: 1 1 1px;
    min-height: 45dvh;
    position: relative;
  }

  #map {
    min-height: 45dvh;
  }

  .found-list-wrap {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 0;
    margin: 0;
    max-width: none;
    border: none;
    border-top: 1px solid var(--panel-border);
  }

  .answer-form {
    padding: 0.5rem 1.25rem;
    gap: 0.5rem;
  }

  .answer-form label {
    display: none;
  }
}
