#keyboard {
  display: flex;
  flex-direction: column;
  margin: auto;
  --gap: 5px;
  gap: var(--gap);
  margin-left: auto;
  margin-right: auto;
  width: calc(var(--width) * 10 / 11);
  overflow-x: auto;
  margin-bottom: 10px;
}

#keyboard button span {
  background-color: transparent;
}

button span.big {
  display: contents;
}

@media screen and (max-width: 1100px) {
  button span.big {
    display: none;
  }
}

#keyboard div {
  display: flex;
  flex-direction: row;
  justify-content: left;
  gap: var(--gap);
}

#keyboard div:nth-child(2) {
  margin-left: 0.5em;
}

#keyboard button.inverse {
  color: var(--white);
  text-shadow: 2px 2px var(--black);
}

#keyboard button {
  touch-action: manipulation;
  justify-self: stretch;
  width: calc(var(--width) / 11.5); /*11.5);*/
  min-height: calc(max(2rem, 25vh/3));
  font-size: 2em;
  font-weight: bold;
  color: var(--black);
  text-shadow: 2px 2px var(--white);
  font-family: InputBetaMono, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}
#keyboard button.wide {
  width: calc(var(--width) / 8);
}

#keyboard button::first-letter {
  text-transform: uppercase;
}

#keyboard.over {
  animation: bump 150ms linear 3;
}
@keyframes bump {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(0.25rem);
  }
  100% {
    transform: translateY(0);
  }
}

#keyboard button:active,
#keyboard button.active {
  animation: pop 250ms ease-in-out;
}

@keyframes pop {
  0% {
    transform: scale(1);
  }
  70% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

#keyboard button {
  border-radius: 0.125em;
  border: none;
  display: grid;
  place-content: center;
  text-transform: uppercase;
  white-space: nowrap;
}
.big {
  text-transform: none;
}

@media screen and (max-width: 400px) {
  #keyboard {
    --gap: 1px;
    width: -webkit-fill-available;
  }
  #keyboard button {
    font-size: 0.8rem;
    border-radius: 5px;
    box-sizing: border-box;
    width: calc(var(--width) / 10);
  }
}
:root {
  --letter-gap: 0.25em;
  --col-gap: 1em;
  --slide-delay: 500ms;
}
ul {
  padding: 0;
  margin: 0;
}

.column {
  transition: transform 500ms;
  --width-size: calc(var(--width) / (10 * var(--n)));
  --height-size: calc(var(--height) / 25);
  --computed-size: calc(min(var(--width-size), var(--height-size)));
  font-size: calc(min(max(var(--computed-size), 8px), 44px));
}

.complete {
  font-size: calc(min(50%, 5px));
}

#words {
  display: flex;
  gap: var(--col-gap);
  justify-content: center;
  flex-wrap: wrap;
}

.column {
  display: flex;
  flex-direction: column;
  gap: var(--letter-gap);
}

.guess {
  list-style: none;
  display: flex;
  gap: var(--letter-gap);
}

/* negative game easter egg */
.reverse .guess {
  flex-direction: row-reverse;
}
.reverse .solution {
  transform: rotateY(180deg);
}

.guess span,
.block {
  width: 1.5em;
  height: 1.5em;
  background-color: var(--white);
  text-align: center;
  display: grid;
  place-content: center;
  color: var(--white);
  transition: color 270ms;
}
.guess span.typed {
  color: var(--black);
  animation: pop 250ms ease-in-out;
  transform-origin: center center;
}

@keyframes pop {
  0% {
    transform: scale(1);
  }
  70% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.reveal.guess > span {
  position: relative;
  overflow: hidden;
}
.reveal.guess > span > span {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateX(-1.5em);
  animation-name: slide-in;
  animation-duration: var(--slide-delay);
  animation-timing-function: linear;
  transition: none 0s;
}

.solution {
  width: 100%;
  text-align: center;
  margin-top: -3em;
  background-color: #2229;
  color: var(--white);
  z-index: 2;
  position: relative;
  padding: 1em;
  box-sizing: border-box;
  font-weight: bold;
  text-shadow: 1px 1px var(--black);
  font-size: 1.5em;
  animation-name: slide-in;
  animation-duration: 500ms;
  animation-delay: 2000ms;
  transition: opacity 2000ms;
  opacity: 0;
}

@keyframes slide-in {
  0% {
    transform: translateX(-1.5em);
    text-color: transparent;
    opacity: 0;
  }
  95% {
    text-color: transparent;
  }
  100% {
    transform: translateX(0em);
    text-color: initial;
    opacity: 1;
  }
}

.guess span.green span,
.block.green {
  background-color: var(--green);
  color: rgb(12, 43, 12);
}
.guess span.yellow span,
.block.yellow {
  background-color: var(--yellow);
  color: rgb(45, 45, 12);
}
.guess span.grey span,
.block.grey {
  background-color: var(--grey);
}
.reveal.guess span {
  transition: all 500ms;
}

.reveal span:nth-child(1) > * {
  animation-delay: 0;
  animation-timing-function: ease-in;
}
.reveal span:last-child > * {
  animation-timing-function: ease-out;
}
.reveal span:nth-child(2) > * {
  animation-delay: calc(var(--slide-delay) * 1);
}
.reveal span:nth-child(3) > * {
  animation-delay: calc(var(--slide-delay) * 2);
}
.reveal span:nth-child(4) > * {
  animation-delay: calc(var(--slide-delay) * 3);
}
.reveal span:nth-child(5) > * {
  animation-delay: calc(var(--slide-delay) * 4);
}
.reveal span:nth-child(6) > * {
  animation-delay: calc(var(--slide-delay) * 5);
}

.reveal span:nth-child(7) > * {
  animation-delay: calc(var(--slide-delay) * 6);
}
.reveal span:nth-child(8) > * {
  animation-delay: calc(var(--slide-delay) * 7);
}

.no-animate * {
  animation-delay: 0s !important;
  animation-duration: 0ms !important;
}

.bad {
  animation: shake 150ms ease-in-out 2;
}

@keyframes shake {
  33% {
    transform: translate(-0.2em);
  }
  66% {
    transform: translate(0.2em);
  }
}
/* Don't mess up default */
.guess span div.a11y {
  display: none;
}

.a11y .column {
  font-size: calc(max(var(--computed-size), 2rem));
}

.a11y .guess {
  margin-top: 0.5em;
}

.a11y .guess span div.a11y {
  display: grid;
  width: 100%;
  text-align: center;
  position: absolute;
  top: -1.5em;
  color: var(--white);
  z-index: 2;
  font-size: 0.35em;
}

.a11y .reveal.guess > span {
  overflow: unset;
}
.a11y .reveal.guess > span > span {
  animation-name: fade-in;
  opacity: 0;
  transform-origin: left;
}
.a11y .reveal.guess span div {
  animation-name: fade-in;
  animation-duration: 300ms;
}

@keyframes fade-in {
  0% {
    opacity: 1;
    color: var(--black);
    transform: scaleX(0);
  }
  100% {
    opacity: 1;
    color: var(--white);
    transform: scaleX(1);
  }
}
#victory {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--width);
  max-width: var(--width);
  height: var(--height);
  max-height: var(--height);
  overflow: auto;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.25);
  transform-origin: center center;
  transition: all 500ms;
  display: grid;
  place-content: center;
  z-index: 2;
  background-color: #fff6;
}
#victory > * {
  background-color: var(--white);
  color: var(--black);
  box-sizing: border-box;
  padding: 2em;
  border: 1px solid var(--grey);
  box-shadow: 3px 3px #0004;
  border-radius: 5px;
  max-width: calc(100vw - 2em);
  overflow: auto;
  max-height: calc(100vh - 10em);
}

#victory button:hover {
  transform: scale(1.1);
}

#victory a {
  text-decoration: none;
  color: var(--black);
}

#victory a:hover {
  text-decoration: underline;
  color: var(--dark-blue);
}

#victory.active {
  transform: scale(1);
  pointer-events: all;
  opacity: 1;
}
#victory .center {
  position: relative;
}
#victory button.c {
  position: absolute;
  top: 2px;
  right: 2px;
  height: 2em;
  width: 2em;
  display: grid;
  place-content: center;
  border-radius: 50%;
}

#victory button:last-child {
  margin-left: auto;
}
#victory .bar {
  display: flex;
  align-items: stretch;
  gap: 3px;
}
#victory button {
  padding: 1em;
  font-weight: bold;
  background-color: var(--white);
  border: 1px solid var(--grey);
  color: var(--grey);
  border-radius: 5px;
  display: inline-block;
}
#victory button:hover {
  background-color: var(--highlight);
  color: var(--highlight-fg);
  transition: all 300ms;
}
#victory button.plusOne {
  background-color: var(--highlight);
  color: var(--highlight-fg);
  font-weight: bold;
}
#victory button.c:hover {
  background-color: var(--yellow);
  color: var(--black);
}
#draw,
#draw img {
  max-width: 100%;
  width: 100%;
  max-height: calc(100vh - 8em);
  object-fit: contain;
}

#draw {
  margin: auto;
}

.today-streak {
  display: flex;
  flex-direction: column;
}
.today-header {
  margin-bottom: -0.5em;
}
.day-buttons {
  padding-top: 1em;
  padding-bottom: 1em;
  display: flex;
  font-size: 0.8em;
  gap: 5px;
  overflow-x: auto;
}
.day-buttons button {
  font-size: 60%;
}

.right {
  margin-left: auto;
  display: flex;
}

#victory .play {
  background-color: var(--white);
  color: var(--black);
  border: none;
  min-width: 2em;
  min-height: 2em;
  display: inline-block;
}

#victory .mini-summary-box {
  display: inline-flex;
  justify-content: center;
  position: relative;
}

.mini-summary-box .icon {
  position: absolute;
  right: -3px;
  top: -8px;
}

#victory .mini-summary-box button {
  background-color: transparent;
}
#victory .success {
  background-color: var(--green);
}
#victory .failure {
  background-color: var(--yellow);
}
.overall-streak {
  margin-left: auto;
  text-align: right;
}
.overall-streak button {
  border-width: 0 !important;
}
.overall-streak button:hover {
  border-width: inherit !important;
}
.n-streak .hide,.n-streak .show {
  transform-origin: top;
  transition: all 300ms;
}

.n-streak .hide {
  max-height : 0;  
  transform: scaleY(0);  
  opacity: 0;
}

.n-streak .show {  
  max-height : 8em;
  overflow-y: auto;
  display: block;
  transform: scaleY(1);
  opacity: 1;
}
.copy-icon {
  width: 1.5em;
  height: 2em;
  border: 2px solid black;  
  position: relative;
  top: -2px;
  left: -2px;
  
}
.copy-icon::after {
  content : " ";  
  background-color: var(--white);
  width: 1.5em;
  display: grid;
  height: 2em;    
  border: 2px solid black;
  position: relative;
  top: 5px;
  left: 5px;
}
.copy-text::after {
  content: "txt";
}
.copy-img::after {
  content: "img"
}

#victory button.sh {  
  display: grid;
  place-content: center;
  align-self: stretch;
}
.sh svg {
  width: 2em;
  height: 2em;
}
.overall-streak {
  max-width: 4em;
}

.streak-popout {
  max-width: 100%;
  position: absolute;
  top: 4em;
  left: 5%;
  padding: 1em;
  box-sizing: border-box;
  border: 1px solid #f80;
  width: 90%;  
  overflow-y: scroll;
  background-color: var(--white);
  z-index: 99;
}span.info .tooltip {
  pointer-events: none;
  opacity: 0;
  transform: translateY(-10px) translateX(-30px);
  position: absolute;
  z-index: 2;
  transition: all 300ms;
}
td {
  vertical-align: top;
  padding-bottom: 0.5em;
}
span.info:hover .tooltip {
  transform: translateY(0) translateX(-25px);
  opacity: 1;
  background-color: var(--yellow);
  color: var(--black);
}

button.info {
  background-color: var(--black);
  color: var(--white);
  border-radius: 50%;
  width: 1.5em;
  height: 1.5em;
  display: grid;
  box-sizing: border-box;
  place-content: center;
}
.modal .close {
  position: sticky;
  top: 1px;
  float: right;
  border-radius: 50%;
  border: none;
  width: 1.5em;
  height: 1.5em;
  display: grid;
  place-content: center;
}
.modal {
  max-width: calc(min(100vw, 450px));
  max-height: calc(100vh - 10em);
  position: fixed;
  top: 55px;
  overflow-y: scroll;
  left: calc(50vw - (min(100vw, 450px) / 2));
  background-color: var(--white);
  color: var(--black);
  font-family: InputSerif;
  padding: 1em;
  padding-bottom: 5em;
  line-height: 1.4;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-300px);
  transition: all 300ms;
}
.modal.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
  z-index: 2;
}

@supports (-webkit-touch-callout: none) {
  button.info,
  .modal .close {
    width: 2em;
    height: 2em;
  }
}
@font-face {
  font-family: InputSerifNarrowWeb;
  src: url("/assets/InputSerifNarrow-Thin.684bb418.ttf")
    format("truetype");
}

@font-face {
  font-family: "InputBetaMono";
  src: url("/assets/InputMonov2-Regular.fde58523.ttf") format("truetype");
}

@font-face {
  font-family: "InputBetaSerifMono";
  src: url("/assets/InputSerifMonov2-Regular.70670411.ttf")
    format("truetype");
}

:root {
  --white: #c5d5e4;
  --black: #222;
  --bg: #0a1642;
  --green: #81c14b;
  --grey: #595c5b;
  --yellow: #f5b700;
  --highlight: #6d84da;
  --highlight-fg: white;
}
header button {
  transition: transform 300ms;
  display: grid;
  place-content: center center;
}

header button:hover {
  transform-origin: center center;
  transform: scale(1.1);
}
html {
  background-color: var(--bg);
  color: var(--white);
}
#setting {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 1em;
  margin-bottom: 1em;
}

html {
  font-family: InputBetaSerifMono, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}
main {
  display: flex;
  flex-direction: column;
  font-family: InputBetaSerifMono, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  height: var(--height, calc(100vh - 10px));
  justify-content: space-between;
  padding-top: 2px;
  padding-bottom: 2px;
  box-sizing: border-box;
}

input {
  font-family: InputBetaMono;
}

header {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  font-size: 0.8em;
  max-height: 10vh;
  position: sticky;
  top: 0;
  border-bottom: 1px solid var(--black);
  margin-bottom: 2px;
  padding-bottom: 3px;
  box-sizing: border-box;
  z-index: 2;
}
header {
  background-color: var(--white);
  color: var(--black);
}

header button,
header input {
  background: var(--white);
  border: none;
}

header h1 {
  font-size: 1.2rem;
  color: var(--black);
  margin-left: auto;
  font-family: InputSerifNarrowWeb, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
    sans-serif;
}

@media screen and (max-width: 600px) {
  header h1 {
    font-size: 1rem;
  }
}

.geek {
  font-family: InputBetaMono;
  margin-left: 2em;
  display: flex;
  justify-content: center;
  align-items: center;
}
.nb {
  height: 1.5em;
  border: none;
  display: flex;
}
#n {
  width: 2.5em;
  height: 1.5em;
  vertical-align: middle;
  font-size: 1.5em;
  padding: none;
  box-sizing: border-box;
  display: grid;
  place-content: center;
  place-self: center;
  text-align: center;
}
input[type="number"]::-webkit-outer-spin-button {
  display: none;
}
input[type="number"]::-webkit-inner-spin-button {
  display: none;
}

body {
  margin: 0;
  padding: 0;
}
footer {
  bottom: 0;
  left: 0;
  width: var(--width);
}
#words {
  height: auto;
  overflow-y: scroll;
}
#keyboard {
  margin: auto;
  height: auto;
  margin-bottom: 2px;
  margin-top: 3px;
}
h1 {
  margin: 0;
}
.ninput {
  display: inline-grid;
  grid-template-areas: "inp up" "inp dwn";
}
.ninput input {
  grid-area: inp;
}
.ninput .nup {
  grid-area: up;
}
.ninput .ndown {
  grid-area: dwn;
}
#n,
.n {
  grid-area: inp;
}

#a11y {
  display: grid;
  place-content: center;
}
#a11y img {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
}

form {
  margin-top: 4px;
  margin-bottom: 4px;
  display: none;
  align-items: center;
  justify-content: center;
}

form.active {
  animation: slide-down 300ms;
  display: flex;
}
