:root {
  --bg: #dbeefc;
  --paper: #fbfdfc;
  --ink: #1f3029;
  --muted: #4c5f6c;
  --line: #b4d3e8;
  --river: #17708a;
  --river-deep: #125a70;
  --heading: #1e4f33;
  --sun: #dc8a14;
  --sun-disc: #ffcb1f;
  --sun-soft: #ffc04a;
  --sun-faint: #fbe6b4;
  --sun-deep: #7a3c00;
  --on-sun: #3a2208;
  --on-river: #ffffff;
  --moon-lit: #e8b84e;
  --moon-dark: #c6d8e6;
  --shadow: 0 1px 0 rgba(30, 60, 85, .14);
  --shadow-lift: 0 8px 20px rgba(30, 60, 85, .18);
  --serif: Charter, 'Bitstream Charter', 'Iowan Old Style', 'Palatino Linotype', Georgia, Cambria, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', 'DejaVu Sans', sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10253a;
    --paper: #182f45;
    --ink: #e9ebe5;
    --muted: #9fb3c0;
    --line: #2e4b62;
    --river: #5ab8c9;
    --river-deep: #7fcbd8;
    --heading: #cfe6b8;
    --sun: #f0b050;
    --sun-disc: #ffd23f;
    --sun-soft: #8a6219;
    --sun-faint: #4a3a18;
    --sun-deep: #f8c877;
    --on-sun: #1f1408;
    --on-river: #0f1a19;
    --moon-lit: #f0cf80;
    --moon-dark: #0c1c2c;
    --shadow: 0 1px 0 rgba(0, 0, 0, .35);
    --shadow-lift: 0 8px 20px rgba(0, 0, 0, .4);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 var(--sans);
}

a { color: var(--river-deep); text-underline-offset: .15em; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

h1, h2 { font-family: var(--serif); font-weight: 700; }

ul { list-style: none; margin: 0; padding: 0; }

.wrap {
  width: 100%;
  max-width: 1040px;
  margin-inline: auto;
  padding-inline: 16px;
}

/* Záhlaví: poledne nad řekou */
.masthead {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sun-faint), var(--bg));
}
.masthead::before {
  content: "";
  position: absolute;
  top: -70px;
  right: max(-30px, calc(50% - 560px));
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: var(--sun-disc);
  box-shadow: 0 0 0 22px color-mix(in srgb, var(--sun-disc) 30%, transparent),
              0 0 0 48px color-mix(in srgb, var(--sun-disc) 14%, transparent);
}
.masthead-in {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-block: 28px 44px;
}
h1 {
  margin: 0;
  font-size: clamp(2.3rem, 8vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -.01em;
  color: var(--heading);
}
.tagline {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.02rem, 3vw, 1.2rem);
  color: var(--muted);
}
.lang {
  flex: none;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: .9rem;
  text-decoration: none;
  box-shadow: var(--shadow);
}
.lang:hover { text-decoration: underline; }
.waves {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 26px;
  fill: var(--river);
  opacity: .28;
}

main { padding-block: 8px 24px; }

section { margin-top: 28px; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-bottom: 12px;
}
.section-head h2 {
  margin: 0;
  font-size: 1.6rem;
  color: var(--heading);
}
.date { margin: 0; color: var(--muted); }
.now {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  line-height: 1.3;
}
.now svg { flex: none; width: 38px; height: 38px; }
.now-main, .now .desc { display: block; }
.now-main strong { font-weight: 700; }
.now .desc { font-size: .9rem; }
.now:hover .now-main { text-decoration: underline; }

.kicker {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--sun-deep);
}
.desc { color: var(--muted); }

/* Dnešní siesta */
.today-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 12px;
}
.daily, .mini, .card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.daily:hover, .mini:hover, .card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
  border-color: var(--sun);
}
.daily {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px;
  background: linear-gradient(135deg, var(--paper) 55%, var(--sun-faint));
}
.daily img {
  flex: none;
  width: clamp(112px, 34%, 180px);
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
}
.daily-text { display: block; min-width: 0; }
.daily strong {
  display: block;
  margin: 4px 0;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  line-height: 1.12;
  overflow-wrap: anywhere;
}
.daily .desc { display: block; }
.play {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--sun-soft);
  color: var(--on-sun);
  font-weight: 700;
}
@media (prefers-color-scheme: dark) {
  .play { background: var(--sun); }
}
.side { display: grid; gap: 12px; }
.mini {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
}
.mini > img, .mini > svg {
  flex: none;
  width: 56px;
  height: 56px;
}
.mini > img { border-radius: 8px; }
.mini strong { display: block; font-size: 1.05rem; }
.mini .desc { display: block; font-size: .92rem; line-height: 1.3; }
.mini .quote { margin-top: 2px; color: var(--ink); font-family: var(--serif); font-style: italic; font-size: 1rem; }
.moon-dark { fill: var(--moon-dark); }
.moon-lit { fill: var(--moon-lit); }
.stars { fill: var(--sun); }
.clock { stroke-linecap: round; }
.clock circle { fill: var(--paper); stroke: var(--river); stroke-width: 3; }
.clock-h { stroke: var(--ink); stroke-width: 3.5; }
.clock-m { stroke: var(--sun); stroke-width: 2.5; }

/* Filtr */
.filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.filter[hidden] { display: none; }
.filter button {
  min-height: 40px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: .95rem;
  cursor: pointer;
}
.filter button:hover { border-color: var(--river); }
.filter button[aria-pressed="true"] {
  background: var(--river);
  border-color: var(--river);
  color: var(--on-river);
  font-weight: 600;
}

/* Mřížka her */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}
.grid li[hidden] { display: none; }
.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
.card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}
.card-text { display: block; padding: 10px 12px 12px; }
.card strong { display: block; font-size: 1.05rem; line-height: 1.25; }
.card .desc { display: block; margin-top: 2px; font-size: .88rem; line-height: 1.3; }
.ext { font-weight: 400; color: var(--muted); }

/* Reklama: na širokých displejích vedle mřížky, jinak pod ní */
.ad {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 24px;
}
.ad-label {
  margin: 0 0 4px;
  font-size: .75rem;
  color: var(--muted);
}
.ad:has(ins[data-ad-status="unfilled"]) { display: none; }
@media (min-width: 1000px) {
  .games-body { display: flex; align-items: flex-start; gap: 24px; }
  .games-body .grid {
    flex: 1;
    min-width: 0;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
  .ad { flex: none; width: 300px; margin-top: 0; }
}

.foot {
  padding-block: 12px 32px;
  color: var(--muted);
  font-size: .92rem;
}

@media (max-width: 760px) {
  .today-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .masthead::before { width: 130px; height: 130px; top: -52px; right: -26px; }
  .masthead-in { padding-block: 22px 38px; }
  .lang { position: relative; margin-top: 44px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .daily { gap: 14px; padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .daily, .mini, .card { transition: none; }
  .daily:hover, .mini:hover, .card:hover { transform: none; }
}
