body {
  font-family: "Work Sans", sans-serif;
  margin: 0;
  background: #f1f0ff;
  color: #746f98;
}
a {
  color: #49417d;
}
em {
  font-family: "Concert One", cursive;
}
h1 {
  text-align: center;
  font-family: "Concert One", cursive;
  text-transform: uppercase;
  color: #746f98;
}
h1 a {
  display: block;
  font-size: 2.3rem;
  text-decoration: underline;
  cursor: pointer;
  color: #746f98;
}
h1 a:hover,h1 a:active {
  text-decoration: underline wavy;
}

main {
  display: flex;
  flex-direction: column;
}

figure {
  width: 100vw;
  flex-direction: column;
  justify-content: center;
  margin: 0 auto;
  max-width: 600px;
  position: relative;
}

figure iframe {
  border: 0;
}

figure video,
figure img {
  width: 80%;
  align-self: center;
}

figure .figure-video__unmute {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
}

figure .figure-set {
  overflow-x: auto;
  scroll-behavior: smooth;
}

figure .figure-set ol li {
  display: inline-flex;
  flex: 1 1 0;
}

figure .figure-set ol li video,
figure .figure-set ol li img {
  width: 100%;
}

figure .figure-set ol {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: stretch;
}

figure .figure-set__container {
  position: relative;
  width: 80%;
  align-self: center;
}
figure .figure-set__container button {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translate(50%,-50%);
}

figure .figure-set ol,
figure .figure-set ol li {
  list-style: none;
  margin: 0;
  padding: 0;
}

figcaption {
  font-family: "IM Fell English", serif;
  align-self: center;
  margin-bottom: 3rem;
  width: 60%;
  text-align: center;
  font-size: 2rem;
}

figcaption textarea {
  display: block;
  background: none;
  color: #49417d;
  font-family: "IM Fell English", serif;
  margin: 0 auto;
  text-align: center;
  border-radius: 0.3rem;
  width: 100%;
  font-size: 1.2rem;
  border-style: dashed;
}
figcaption button.edit {
  cursor: pointer;
  font-size: 1.5rem;
  transform: rotate(-90deg);
  transition: transform 0.2s;
}

figcaption button.edit:hover {
  transform: rotate(-180deg);
  color: #000;
}

figcaption  span:has(+ button.edit:hover) {
  text-decoration: underline wavy #000;
}

figcaption button {
  border: 0;
  color: #49417d;
  background: none;
}

figcaption .form .button {
  color: #49417d;
  background: none;
  border: 1px solid;
  padding: 0.5rem;
  margin: 0.5rem 0;
  font-family: "Concert One", cursive;
  border-radius: 0.5rem;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
}
figcaption .form button.button {
  background: #fff;
  cursor: pointer;
}
figcaption .form a.button {
  text-decoration: none;
  background: #49417d;
  color: #fff;
  display: inline-flex;
  align-items: center;
}
figcaption .form a.button span {
  padding: 0 4px;
}
figcaption .form a[disabled] {
  pointer-events: none;
  background: #757aa0;
  cursor: not-allowed;
}

figure:target ~ figure:last-child,
figure {
  display: none;
}

figure:last-child,
figure:target {
  display: flex;
}

.blur {
  filter: blur(0.3rem);
}

time {
  margin-left: 4rem;
  font-style: italic;
}

p:first-of-type::before {
  content: " ";
  display: block;
  background: url("img/bits.gif") no-repeat;
  background-size: contain;
  width: 3rem;
  height: 3rem;
  top: -2rem;
  left: -1.5rem;
  position: absolute;
}

p {
  position: relative;
  padding: 1rem;
  background: #fff;
  border-radius: 1rem;
  margin: 0.3rem 2rem;
  max-width: max-content;
}

p::after {
  content: " ";
  border-right: 0.3rem solid #fff;
  position: absolute;
  display: block;
  bottom: -0.6rem;
  height: 0.6rem;
}

p:last-of-type::after {
  display: none;
}

nav {
  position: fixed;
  bottom: 3px;
  display: flex;
  justify-content: space-around;
  margin: 0 auto;
  max-width: 600px;
  left: 50vw;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid;
  color: #49417d;
  border-radius: 1.5rem;
  overflow: hidden;
}

nav button {
  background: none;
  border: none;
  color: #49417d;
  border-right: 1px solid;
  font-family: "Concert One", cursive;
  font-size: 1.5rem;
  padding: 0.3rem 0.5rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
nav button:last-child {
  border-right: 0;
}

button.nav {
  background: none;
  border: none;
  color: #49417d;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid;
  font-family: "Concert One", cursive;
  font-size: 1.5rem;
  border-radius: 0.5rem;
  padding: 0.3rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

button.nav:disabled,
nav button:disabled {
  background: transparent !important;
  color: #49417d !important;
  cursor: not-allowed;
  opacity: 0.6;
}

button.nav span,
nav button span {
  font-size: 1rem;
  vertical-align: text-top;
  padding: 0 4px;
}

button.nav:active,
button.nav:hover,
nav button:active,
nav button:hover {
  background-color: #49417d;
  color: #fff;
}

#info,
#share {
  flex-grow: 1;
}

/* Mobile */
@media (max-width: 576px) {
  button.nav span,
  nav button span {
    display: none;
  }
}

footer {
  font-style: italic;
  opacity: 0.8;
  max-width: 600px;
  margin: 0 auto 10rem auto;
  text-indent: 3rem;
}

[aria-hidden] {
  opacity: 0.7;
  pointer-events: none;
  /* filter: blur(4px); */
}

dialog .cancel {
  position: absolute;
  top: 0;
  right: 0;
  background: none;
  padding: 1rem;
  border-radius: 1rem;
  font-size: 1.2rem;
  border: 0;
}

dialog {
  box-shadow: rgb(0 0 0 / 25%) 0px 0 20px 10px;
  border-radius: 1rem;
  border: 0;
  pointer-events: all;
  top: 50%;
  width: 600px;
  max-width: 80vw;
  max-height: 80vh;
  overflow: auto;
  transform: translateY(-50%);
  animation: enter 500ms forwards;
  z-index: 2;
  position: fixed;
}
dialog::backdrop {
  background: rgba(255, 255, 255, 0.25);
}

dialog h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-family: "Concert One", cursive;
  text-transform: uppercase;
  color: #746f98;
}

dialog input {
  padding: 0.2rem;
  border-radius: 6px;
  border: 1px solid;
  color: #746f98;
}

@keyframes enter {
  0% {
    transform: translateY(100vh);
  }
  100% {
    transform: translateY(-50%);
    box-shadow: rgb(0 0 0 / 25%) 0px 12px 20px 10px;
  }
}

dialog ul,
dialog li {
  display: inline-block;
  list-style: none;
  margin: 0;
  padding: 0;
}

dialog li {
  background: #f1f0ff;
  padding: 1rem;
  margin: 0.5rem;
  border-radius: 1rem;
}

dialog p {
  background-color: #f1f0ff;
}

dialog p:first-of-type {
  margin-top: 2rem;
}

dialog p::after {
  border-right-color: #f1f0ff;
}

/* Loading */
.loader {
  background: repeating-linear-gradient(-45deg,#f1f0ff,#f1f0ff 20px,#fff 20px,#fff 40px);
	background-size:56px 56px;/* This is unique for this background, need to find a pattern and develop a formula */
	background-position-x:0%;
	animation: slide 20s infinite linear forwards;
  aspect-ratio: 1/1;
}

@keyframes slide {
	0%{
		background-position-x:0%;
	}
	100% {
		background-position-x:100%;
	}
}

.loader.loaded {
  background: none;
}