:root {
  --col-bg: #E9E9E8;
  --col-accent: #F44724;
  --font-main: input-sans-condensed, sans-serif;
}

/* impediamo l'effetto elastico dello scroll su iOS */
/* (ci serve se vogliamo avere interazione tattile con qualche sketch) */
/* cfr. https://www.bram.us/2016/05/02/prevent-overscroll-bounce-in-ios-mobilesafari-pure-css/ */
html.sketch.fixed,
html.sketch.fixed body {
  position: fixed;
  /* overflow: hidden; */
}

html.sketch,
html.sketch body {
  height: 100%;
}

body {
  font-family: var(--font-main);
  margin: 0;
  padding: 0;
}

a,
a:visited {
  color: #000;
  transition: color 0.125s ease-in;
}

a:hover,
a:focus {
  color: var(--col-accent);
}

h1 {
  margin: 0;
  text-align: center;
  font-style: italic;
  letter-spacing: -0.075em;
  font-size: 4rem;
  color: var(--col-accent);
}

h1 + p {
  text-align: center;
  padding: 0 4rem;
}

html.sketch body {
  width: 100%;
  background-color: #000;
  padding: 0;
  display: flex;
}

body.fs {
  margin: 0;
}

header {
  margin-top: 6rem;
}

canvas {
  display: block;
  margin: auto;
}

#count {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  padding: 1rem;
  color: #fff;
}

#caption {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2rem;
  font-size: 0.7em;
  color: #fff;
}

.fs #caption,
.cartolina #caption {
  display: none;
}

#btn-back {
  position: absolute;
  top: -116px;
  left: 0;
  padding: 0.5em;
  color: #fff;
  text-decoration: none;
}

/* Front. */
body.front {
  background-color: var(--col-bg);
}

.front ul {
  display: grid;
  /* grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); */
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  list-style: none;
  padding: 0 1px;
  /* margin: 6rem 2rem; */
  margin: 6rem auto;
  max-width: 120rem;
}

@media only screen and (min-width: 601px) {
  .front ul {
    margin: 6rem auto;
  }
}

.front ul > li {
  position: relative;
  /* padding: 0.75rem; */
  padding: 1px;
}

.front ul > li a {
  display: block;
  /*padding: 1rem;*/
}

.front ul > li img {
  display: block;
  max-width: 100%;
  filter: contrast(1.5) grayscale(1);
  transition: filter 0.125s ease-in;
  /* border-radius: 0.5rem; */
}

.front ul > li:hover img {
  filter: none;
}

.front ul > li .title {
  display: block;
  position: absolute;
  left: 1rem;
  /* bottom: 1rem; */
  top: 1rem;
  max-width: 33%;
  hyphens: auto;
  /* left: 0; */
  /* bottom: 0; */
/*   left: 50%; */
/*   top: 50%; */
/*   transform: translate(-50%, -50%); */
  padding: 0.4rem 0.5rem;
  background-color: var(--col-bg);
  font-size: 0.8em;
  /* opacity: 0; */
  /* transition: opacity 0.125s ease-out; */
  /* border-radius: 0.5rem; */
}

.front ul > li:hover .title {
  /* opacity: 1; */
}


footer {
  margin-bottom: 6rem;
}

#eg {
  height: 3rem;
}

#eg path {
  fill: var(--col-accent);
}


ul.filtered li {
  display: none;
}

ul.filtered li.show {
  display: block;
}


#q {
  display: none;
}

#qd {
  font-style: normal;
  font-weight: normal;
  color: #000;
}

#qd:not(:empty)::before {
  content: '/ ';
  /* color: #C0BDBC; */
}

#qd:not(:empty)::after {
  content: '_';
  color: var(--col-accent);
  animation: blink 1s step-start 0s infinite;
}

@keyframes blink {
  50% {
    color: transparent;
  }
}

