:root {
  --color: #000d;
  --background: #eee;
  --title-background: #fffc;
  --title-secondary-color: #0009;
  --marker-color: #cd32cb;
  --playlist-background: #d9cbe3; /* #e3e3cb */
  --playlist-border-color: #0004;
  --playlist-title-color: #0009;
  --playlist-title-background: #00000018;
}
@media (prefers-color-scheme: dark) {
  :root {
    --color: #fffc;
    --background: #222;
    --title-background: #484848bb;
    --title-secondary-color: #fff9;
    --marker-color: #ff40fd;
    --playlist-background: #6a5876; /* #e3e3cb */
    --playlist-border-color: #fff3;
    --playlist-title-color: #fffa;
    --playlist-title-background: #fff2;
  }
}
html {
  font: normal 100% / 1.2 sans-serif;
  color: var(--color);
  background: var(--background);
}
svg {
  font: inherit;
}
body {
  padding: 0;
  margin: 0;
}
h1 {
  min-width: 18em;
  font-size: 1rem;
  font-weight: normal;
  margin: 0;
}
.layout {
  position: absolute;
  inset: 0;
  overflow-x: auto;
  overflow-y: hidden;
}
#title {
  text-align: center;
  background: var(--title-background);
  padding: 0.35rem 0.75rem;
  position: absolute;
  left: 0.5rem;
  bottom: 0.5rem;
  z-index: 500;
}
#title h1 > span {
  display: block;
  font-size: 0.75em;
  color: var(--title-secondary-color);
}
#map {
  width: 155.953vh;
  height: 100vh;
  background: url("/alemannic/assets/map.svg") 50% 50% / cover no-repeat;
  margin: 0 auto;
  position: relative;
}
@media (prefers-color-scheme: dark) {
  #map {
    background-image: url("/alemannic/assets/map.dark.svg");
  }
}
.marker {
  --d: 16px;
  width: var(--d);
  height: var(--d);
  background: var(--marker-color);
  border: 1px solid;
  border-radius: 50%;
  padding: 0;
  position: absolute;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
  opacity: 0.75;
  cursor: pointer;
  transition:
    width 0.1s,
    height 0.1s;
}
.marker.selected {
  --d: 24px;
  /*box-shadow: 0 0 0 3px #41e14b;*/
}
.place {
  --d: 5px;
  --dx: calc(0.5 * var(--d) + 2px);
  --dy: calc(0.5 * var(--d));

  font-size: 0.6em;
  padding: 0 0 var(--dy) var(--dx);
  position: absolute;
  transform: translate(0, -100%);
  box-sizing: border-box;
}
.place::before {
  content: "";
  display: block;
  width: var(--d);
  height: var(--d);
  background: var(--color);
  border-radius: 50%;
  position: absolute;
  left: 0;
  bottom: 0;
  transform: translate(-50%, -50%);
}
.country {
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(0, 0, 0, 0.06);
  position: absolute;
  transform: translate(-50%, -50%);
  user-select: none;
}
.country[data-code="ch"] {
  color: rgba(0, 0, 0, 0.04);
}
.country[data-code="li"] {
  color: rgba(0, 0, 0, 0.15);
}
@media (prefers-color-scheme: dark) {
  .country {
    color: rgba(255, 255, 255, 0.08);
  }
  .country[data-code="ch"] {
    color: rgba(255, 255, 255, 0.06);
  }
  .country[data-code="li"] {
    color: rgba(255, 255, 255, 0.17);
  }
}
#playlist {
  --border: 0.02rem solid var(--playlist-border-color);
  --padding-x: 1rem;
  display: flex;
  flex-direction: column;
  width: 360px;
  max-width: 100%;
  max-height: 100vh;
  background: var(--playlist-background);
  /*border: var(--border);*/
  border-width: 2px;
  border-top: none;
  border-right: none;
  overflow: auto;
  position: fixed;
  right: 0;
  top: 0;
  box-sizing: border-box;
}
#playlist .item-title {
  font-size: 0.7em;
  font-weight: bold;
  text-transform: uppercase;
  color: var(--playlist-title-color);
  background: var(--playlist-title-background);
  border-top: var(--border);
  border-bottom: var(--border);
  padding: 0.45em var(--padding-x) 0.4em;
  box-sizing: border-box;
}
#playlist .item-title:first-child {
  border-top: none;
}
#playlist audio {
  width: 100%;
}
#playlist figure {
  border-bottom: var(--border);
  padding: 0.75em var(--padding-x);
  margin: 0;
}
#playlist figcaption {
  padding: 0;
}
#playlist .title {
  margin-bottom: 0.5rem;
}
#playlist .title > span {
  display: block;
}
#playlist .title-content {
  font-weight: bold;
}
#playlist .author {
  font-size: 0.7em;
  font-style: italic;
  margin-top: 0.15rem;
  opacity: 0.7;
}
#playlist .source {
  font-size: 0.7em;
  margin-top: 0.35rem;
  opacity: 0.5;
}
#playlist .close {
  width: 100%;
  font: inherit;
  font-size: 0.6em;
  text-transform: uppercase;
  vertical-align: top;
  color: var(--playlist-title-color);
  background: var(--playlist-title-background);
  border: none;
  border-top: var(--border);
  padding: 0.4em var(--padding-x);
  margin: 0;
  box-sizing: border-box;
  cursor: pointer;
}
#playlist.hidden {
  display: none;
}
#footer {
  font-size: 0.6em;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--playlist-title-color);
  background: var(--playlist-title-background);
  padding: 0.2em 1em 0.1em;
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
}
#footer span {
  display: inline-block;
  transform: scaleY(0.8);
}
@media (max-width: 600px) {
  .marker {
    --d: 18px;
  }
  .marker.selected {
    --d: 24px;
  }
  #playlist {
    width: 100%;
    border: none;
    bottom: 0;
  }
  #playlist .list {
    flex: auto;
  }
  #playlist .item-title {
    font-size: 0.8em;
    padding: 0.65em var(--padding-x) 0.6em;
  }
  #playlist .close {
    font-size: 0.8em;
    padding: 0.65rem var(--padding-x);
  }
}
