:root {
  --bg: #f2f4ea;
  --panel: #ffffff;
  --panel-edge: #d9ddc7;
  --ink: #222518;
  --muted: #6f7560;
  --accent: #5c7a2a;
  --accent-bright: #86a83f;
  --logo-plate: #ffffff;

  --font-pixel: "Press Start 2P", monospace;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
}

body {
  padding: 4vh 1.25rem 6vh;
  overflow-x: hidden;
}

main {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

/* ---------- hero ---------- */

.hero {
  text-align: center;
  padding: 2vh 0 5vh;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 480px;
  max-width: 90vw;
  height: 220px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(124, 154, 62, 0.14), transparent 70%);
  z-index: -1;
}

/* the mark is dark-on-light by design, so it rides on its own paper plate
   rather than fading into the page background */
.logo-plate {
  width: 85%;
  max-width: 27.25rem;
  margin: 0 auto;
  background-color: var(--logo-plate);
  padding: 1.1rem 1.75rem;
}

.logo {
  display: block;
  width: 100%;
  height: auto;
}

.tagline {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

/* ambient pixel dust, echoes the sparkle in the logo mark */
.dust {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.dust span {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--accent);
  opacity: 0.18;
  animation: twinkle 7s ease-in-out infinite;
}

.dust span:nth-child(1) { top: 12%; left: 18%; animation-delay: 0s; }
.dust span:nth-child(2) { top: 22%; left: 78%; animation-delay: 1.4s; width: 6px; height: 6px; }
.dust span:nth-child(3) { top: 65%; left: 8%;  animation-delay: 2.8s; }
.dust span:nth-child(4) { top: 78%; left: 85%; animation-delay: 4.2s; width: 10px; height: 10px; }
.dust span:nth-child(5) { top: 45%; left: 92%; animation-delay: 5.6s; width: 6px; height: 6px; }

@keyframes twinkle {
  0%, 100% { opacity: 0.12; transform: translateY(0); }
  50%      { opacity: 0.5;  transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
  .dust span { animation: none; opacity: 0.25; }
}

/* ---------- panels + signature pixel-corner frame ---------- */

.panel {
  position: relative;
  z-index: 1;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  padding: 1.75rem;
}

.eyebrow {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin: 0 0 0.9rem;
}

.panel h2 {
  margin: 0 0 1.25rem;
  font-size: 1.3rem;
  font-weight: 600;
}

/* signature corner brackets, four small squares lifted from the logo's own pixels */
.pixel-frame {
  position: relative;
  --corner: 8px;
  background-image:
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-size: var(--corner) var(--corner);
  background-position:
    0 0,
    100% 0,
    0 100%,
    100% 100%;
}

/* ---------- map ---------- */

#mapa {
  height: 320px;
  width: 100%;
  background: var(--panel-edge);
}

/* mute the stock OSM tiles slightly so they sit quietly behind the markers */
#mapa .leaflet-tile-pane {
  filter: saturate(0.75) brightness(1.03);
}

.counter {
  margin: 1rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
}

.counter span {
  color: var(--accent-bright);
  font-weight: 600;
}

.chyba {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: #b8542f;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: var(--panel);
  color: var(--ink);
}

.pin-navstiveno {
  width: 18px;
  height: 18px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--accent);
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

/* ---------- game tiles ---------- */

.hry-mrizka {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.dlazdice {
  display: block;
  text-decoration: none;
  color: var(--ink);
  background-color: var(--panel);
  border: 1px solid var(--panel-edge);
  padding: 0;
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.dlazdice:hover,
.dlazdice:focus-visible {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.dlazdice:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

.dlazdice h3 {
  margin: 0;
  padding: 0.9rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.nahled {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    repeating-conic-gradient(var(--panel-edge) 0% 25%, var(--panel) 0% 50%) 0 0 / 24px 24px;
}

.nahled img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- responsive ---------- */

@media (max-width: 560px) {
  .hry-mrizka {
    grid-template-columns: 1fr;
  }

  #mapa {
    height: 260px;
  }
}
