:root {
  --bg: #eef1f5;
  --card: #ffffff;
  --text: #16202e;
  --muted: #5c6878;
  --line: #d8dee7;
  --primary: #1e6fd9;
  --boef: #d7263d;
  --politie: #1e4fa8;
  --ok: #1d7a3e;
  --warn: #c2410c;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 16px max(32px, env(safe-area-inset-bottom));
}

h1 { font-size: 26px; margin: 8px 0 12px; }
h2 { font-size: 18px; margin: 0 0 10px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin: 12px 0;
}

.hint { color: var(--muted); font-size: 14px; }
.center { text-align: center; }
.error { color: var(--boef); font-weight: 600; }
.ok { color: var(--ok); font-weight: 600; }

label { display: block; font-weight: 600; margin: 10px 0 4px; }

input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
}

button {
  font: inherit;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  cursor: pointer;
}
button:disabled { opacity: 0.5; }

button.big {
  display: block;
  width: 100%;
  padding: 16px;
  margin: 10px 0;
  font-size: 19px;
  font-weight: 700;
}
button.primary { background: var(--primary); border-color: var(--primary); color: #fff; }

button.link {
  background: none;
  border: none;
  padding: 6px;
  color: var(--primary);
  text-decoration: underline;
}
button.link.danger { color: var(--boef); display: block; margin: 20px auto 0; }

.row { display: flex; gap: 8px; }
.row button { flex: 1; }

ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}
ul.plain li:last-child { border-bottom: none; }

.role {
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  padding: 14px;
  border-radius: 14px;
  background: #5c6878;
  color: #fff;
}
.role.boef { background: var(--boef); }
.role.politie { background: var(--politie); }

.round-meta { text-align: center; margin: 8px 0 0; }

.teams { font-size: 15px; margin: 10px 0 0; line-height: 1.8; }
.tag {
  display: inline-block;
  min-width: 64px;
  padding: 0 8px;
  margin-right: 4px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.6;
  text-align: center;
}
.tag.boef { background: var(--boef); }
.tag.politie { background: var(--politie); }

.countdown { font-variant-numeric: tabular-nums; }
.warn { color: var(--warn); font-weight: 800; }

#map {
  height: 45vh;
  min-height: 260px;
  border-radius: 14px;
  border: 1px solid var(--line);
  margin: 12px 0;
  background: #dfe5ec;
}

.map-btn {
  font-size: 14px;
  font-weight: 600;
  padding: 8px 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.boef-row { margin: 8px 0; }
.caught { opacity: 0.75; }

.photo {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 10px;
  margin-top: 8px;
}

.result h1 { margin-top: 0; }

.offline {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--warn);
  color: #fff;
  text-align: center;
  padding: 8px;
  font-weight: 600;
}
