* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  margin: 10px;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif;
}

.site-nav {
  background-color: #f8f9fa;
  border-radius: 5px;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  padding: 10px;
  display: flex;
}

.site-nav > a {
  color: #333;
  font-weight: bold;
  text-decoration: none;
}

.site-nav ul {
  gap: 15px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
}

.site-nav li a {
  color: #666;
  border-radius: 3px;
  padding: 5px 10px;
  text-decoration: none;
  transition: background-color .2s;
}

.site-nav li a:hover {
  color: #333;
  background-color: #e9ecef;
}

dialog {
  background: linear-gradient(rgba(255, 255, 255, .9), rgba(255, 255, 255, .9)),
    var(--image);
  background-size: cover;
  border: none;
  border-radius: 8px;
  width: 500px;
  max-width: 100%;
  height: 400px;
  max-height: 100vh;
  padding: 20px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 6px rgba(0, 0, 0, .1), 0 1px 3px rgba(0, 0, 0, .08);
}

dialog::-ms-backdrop {
  background: rgba(0, 0, 0, .5);
}

dialog::backdrop {
  background: rgba(0, 0, 0, .5);
}

dialog button {
  color: #000;
  cursor: pointer;
  background: none;
  border: 0;
  border-radius: 4px;
  outline: 0;
  padding: 8px;
  font-family: monospace;
  font-size: 1.2rem;
  transition: background-color .2s;
  position: absolute;
  top: 8px;
  right: 8px;
}

dialog button:hover {
  background: rgba(0, 0, 0, .1);
}

dialog button:active {
  background: rgba(0, 0, 0, .2);
}

body:has(dialog[open]) {
  overflow: hidden;
}

small {
  color: #666;
  font-size: .85em;
}

header {
  text-align: center;
}

time {
  white-space: nowrap;
  min-width: 40px;
  font-weight: bold;
}

header h2 {
  font-size: 1.5rem;
  font-style: italic;
  font-weight: normal;
}

header a {
  color: #fff;
  background-color: #000;
  border-radius: 5px;
  margin-top: .5rem;
  margin-bottom: 1rem;
  padding: 10px;
  text-decoration: none;
  display: inline-block;
}

main {
  background: #ccc;
  border: 1px solid #ccc;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  display: grid;
}

a {
  color: #000;
}

section {
  background: #fff;
  padding: 10px;
}

.weekday {
  text-align: center;
  background: #fff;
  padding: 5px;
}

h2 {
  margin: 0 0 .5rem;
  font-size: 1.1rem;
}

.weekday-mobile {
  display: none;
}

article.card {
  border-left: 3px solid #000;
  border-radius: 3px;
  gap: 8px;
  margin-bottom: 8px;
  padding: 4px;
  font-size: .9rem;
  display: flex;
}

article.card img {
  cursor: pointer;
  width: 1em;
  margin-left: auto;
}

@media (max-width: 800px) {
  main {
    background: none;
    border: none;
    flex-direction: column;
    gap: 20px;
    padding: 5px;
    display: flex;
  }

  article.card {
    font-size: 1rem;
  }

  .weekday {
    display: none;
  }

  h2 {
    font-size: 1.2rem;
  }

  main section {
    padding: 0;
  }

  main section:empty {
    display: none;
  }

  .site-nav a, .site-nav {
    display: block;
  }

  .site-nav ul {
    margin-top: .5rem;
    font-size: .9rem;
    display: block;
  }

  .site-nav li {
    display: inline-block;
  }

  section.empty {
    display: none;
  }

  .weekday-mobile {
    display: inline;
  }
}
