/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}

body {
  line-height: 1;
}

ol,
ul {
  list-style: none;
}

blockquote,
q {
  quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
  content: "";
  content: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

@font-face {
  font-family: "Wellfleet";
  font-weight: normal;
  src: url("./Wellfleet-Regular.ttf");
}
button,
details > summary {
  cursor: pointer;
}

b,
strong {
  font-weight: bolder;
}

i,
em {
  font-style: italic;
}

:root {
  background-color: #000;
  background-image: url("./bg.png");
  color: #fff;
  color-scheme: dark;
  font-family: "Wellfleet", serif;
  font-size: 16px;
  font-weight: normal;
}

a {
  color: #813c5f;
}
a:hover, a:focus {
  color: #bd377a;
}

::selection {
  background: #312129;
  color: #fff4c4;
}

* {
  box-sizing: border-box;
  image-rendering: pixelated;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.25) rgba(0, 0, 0, 0.1);
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}
*::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.52);
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}
*::-webkit-scrollbar-corner {
  background: rgba(0, 0, 0, 0.1);
}

@keyframes progress {
  from {
    background-position-x: 0;
  }
  to {
    background-position-x: 180vw;
  }
}
html,
body {
  margin: 0;
  padding: 0;
}

html {
  width: 100%;
}

body {
  min-width: 100%;
  contain: paint;
}

progress {
  position: relative;
  width: 90%;
  height: 2rem;
  margin: 5%;
  margin-top: 45vh;
  appearance: none;
  background-color: rgba(0, 0, 0, 0.25);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25) inset;
  border-radius: 0.5rem;
  border: none;
  overflow: hidden;
  appearance: none;
}
progress::-webkit-progress-bar {
  background-color: transparent;
}
progress::-webkit-progress-value, progress::-moz-progress-bar {
  background-color: #000;
  border-top-left-radius: 0.5rem;
  border-bottom-left-radius: 0.5rem;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0) 25%, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0) 75%);
  background-size: 200% 100%;
  animation: progress 1s linear infinite;
}

progress + main {
  display: none;
}

noscript {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

main {
  width: 100%;
  min-height: 100vh;
  padding: 1rem;
  display: grid;
  grid-gap: 0.5rem;
  align-items: center;
}

iframe {
  box-sizing: border-box;
  border: 16px outset rgba(94, 66, 43, 0.75);
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  flex: auto;
}
iframe::selection {
  background: transparent;
}

.spectacles {
  grid-area: spec;
}

@keyframes game {
  from {
    width: 0;
    height: 0;
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes gameout {
  from {
    opacity: 1;
  }
  to {
    width: 0;
    height: 0;
    opacity: 0;
  }
}
.game {
  position: fixed;
  inset: 32px;
  animation: game 0.5s cubic-bezier(0.075, 0.82, 0.165, 1);
  margin: auto;
  width: calc(100% - 4rem);
  height: calc(100% - 4rem);
  border-width: 2px;
  background: #ff4080;
  contain: paint;
  max-width: 834px;
  max-height: 510px;
}

.game_choice {
  position: unset;
  grid-area: spec;
}

.game_slide {
  background: transparent;
  border: none;
}

.game.over {
  animation: gameout 0.5s cubic-bezier(0.075, 0.82, 0.165, 1) forwards;
  pointer-events: none;
}

.music {
  grid-area: music;
}

.sfx {
  grid-area: sfx;
}

#img1 {
  grid-area: img1;
  pointer-events: none;
}

#img2 {
  grid-area: img2;
  pointer-events: none;
}

.log {
  grid-area: log;
}

.floater {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  transition: top 0.5s ease-out, left 0.5s ease-out, width 0.5s ease-out, height 0.5s ease-out, opacity 0.2s ease-out;
  opacity: 1;
  border-radius: 0.5rem;
}
.floater:hover {
  opacity: 0.5;
}
.floater.hidden {
  top: 50% !important;
  left: 50% !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0;
  pointer-events: none;
  user-select: none;
}

.sfx_text {
  display: none;
}

main {
  grid-template-areas: "img1 music img2" "img1 log img2" "img1 sfx img2" "spec spec spec";
  grid-template-columns: 2fr 1fr 2fr;
  grid-template-rows: 100px 0.5fr 50px 1fr;
}

#img1,
#img2 {
  border-radius: 50%;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}