:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --text: #16202a;
  --muted: #607085;
  --line: #dce4ee;
  --primary: #1769e0;
  --primary-dark: #0d4fad;
  --danger: #c0392b;
  --ok: #178a55;
  --warn-bg: #fff2d4;
  --warn-line: #e9b949;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 0.72rem 0.95rem;
  cursor: pointer;
}

button:hover {
  border-color: #b8c7da;
}

button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

button.primary:hover {
  background: var(--primary-dark);
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.72rem 0.8rem;
  background: white;
  color: var(--text);
}

.app {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(2.1rem, 4vw, 4rem);
  line-height: 1;
}

h2 {
  font-size: 1.05rem;
  margin-bottom: 16px;
}

.intro {
  max-width: 640px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.status-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 14px;
}

.status-panel span:last-child {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.88rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #8a98aa;
  flex: 0 0 auto;
}

.dot.ok {
  background: var(--ok);
}

.dot.warn {
  background: var(--danger);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.alert-strip {
  border: 1px solid var(--warn-line);
  background: var(--warn-bg);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 20px;
  color: #543b00;
}

.hidden {
  display: none;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.mini-map-shell {
  margin-top: 14px;
}

.mini-map {
  position: relative;
  width: 100%;
  height: 180px;
  border-radius: 8px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: #eef3f8;
}

.tile-layer {
  position: absolute;
  width: 768px;
  height: 768px;
  left: 0;
  top: 0;
  transform-origin: top left;
}

.tile-layer img {
  position: absolute;
  width: 256px;
  height: 256px;
  user-select: none;
}

.map-marker {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--danger);
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 12px rgba(22, 32, 42, 0.28);
}

.map-label {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  max-width: calc(100% - 20px);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  padding: 5px 7px;
  font-size: 0.78rem;
  box-shadow: 0 2px 8px rgba(22, 32, 42, 0.14);
}

.map-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--primary);
  font-size: 0.86rem;
  text-decoration: none;
}

.map-link:hover {
  text-decoration: underline;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title span {
  color: var(--muted);
}

.place-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.place-card,
.settings,
.empty {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.place-card {
  padding: 16px;
}

.empty {
  padding: 22px;
  color: var(--muted);
}

.place-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.place-card h3 {
  margin: 0;
  font-size: 1rem;
}

.country {
  color: var(--muted);
  font-size: 0.88rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  background: #e8f4ee;
  color: var(--ok);
  white-space: nowrap;
}

.badge.hail {
  background: #fde9e6;
  color: var(--danger);
}

.meta {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.meta strong {
  color: var(--text);
}

.hours {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.hour-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.48rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.hour-pill.hail {
  border-color: #efb5ad;
  background: #fff3f1;
  color: var(--danger);
}

.delete {
  padding: 0.35rem 0.55rem;
  color: var(--muted);
}

.settings {
  padding: 16px;
  position: sticky;
  top: 16px;
}

.settings form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox input {
  width: auto;
}

.hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

@media (max-width: 820px) {
  .hero,
  .toolbar,
  .layout {
    grid-template-columns: 1fr;
  }

  .hero {
    display: grid;
  }

  .status-panel,
  .settings {
    position: static;
    min-width: 0;
  }

  .mini-map {
    height: 170px;
  }
}
