@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 300;
  src: url("../fonts/Raleway-Light.woff") format("woff");
}

@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 800;
  src: url("../fonts/Raleway-ExtraBold.woff") format("woff");
}

* {
  box-sizing: border-box;
}

.content h2 {
  font-weight: 300;
  text-shadow: 0 1px 3px rgb(0 0 0 / 35%);
  letter-spacing: -.04em;
  text-transform: none;
  word-spacing: normal;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

#name-hold {
  font-weight: 800;
  touch-action: none;
}

.greeting-cursor {
  display: inline-block;
  margin-inline-start: .16em;
  font-weight: 300;
  opacity: 0;
  animation: greeting-cursor-blink 1.4s step-end infinite;
}

@keyframes greeting-cursor-blink {
  0%, 45% { opacity: .8; }
  46%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .greeting-cursor { animation: none; opacity: .8; }
}

html,
body {
  block-size: 100%;
  overflow: hidden;
  background: #777;
}

body {
  block-size: 100dvh;
  display: flex;
  align-items: center;
  margin: 0;
  background: #777;
  color: #fff;
  font-family: "Raleway", sans-serif;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.75;
  text-transform: uppercase;
}

.top-fill {
  position: fixed;
  inset-block-start: 0;
  inset-inline-start: 0;
  z-index: 0;
  inline-size: 100%;
  block-size: 80px;
  background: #aaa;
  pointer-events: none;
}

.rain-background {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: block;
  inline-size: 100%;
  block-size: 100%;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 60px,
    #000 calc(100% - 100px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 60px,
    #000 calc(100% - 100px),
    transparent 100%
  );
}

.rain-notice {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: none;
  place-items: center;
  padding: 2rem;
  background: #555 url("../background/background_empty.png") center / cover no-repeat;
  color: rgb(255 255 255 / 86%);
  font: 14px/1.5 system-ui, sans-serif;
  text-align: center;
}

.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  inline-size: 100%;
  margin-block: 0;
  padding: min(clamp(1.5rem, 3vw, 1.875rem), 5vh) clamp(1rem, 4vw, 3rem) min(clamp(.625rem, 2vw, 1rem), 2vh);
  color: #fff;
  text-align: center;
}

.avatar {
  inline-size: min(clamp(9.375rem, 12vw, 18.75rem), 35dvh);
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px #999, 0 2px 5px 4px rgb(0 0 0 / 20%);
}

.coin {
  flex: 0 0 auto;
  cursor: pointer;
  outline: none;
  perspective: 1000px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.coin:focus-visible {
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px rgb(255 255 255 / 45%), 0 2px 5px 4px rgb(0 0 0 / 20%);
}

.coin-inner {
  position: relative;
  inline-size: 100%;
  block-size: 100%;
  border-radius: inherit;
  transform: rotateY(0deg);
  transform-style: preserve-3d;
  will-change: transform;
}

.coin-face {
  position: absolute;
  inset: 0;
  display: grid;
  border-radius: inherit;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.coin-front img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.coin-back {
  place-content: center;
  padding-inline: 8%;
  border: 1px solid rgb(255 255 255 / 24%);
  background: linear-gradient(180deg, #787878 0%, #5f5f5f 100%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 8%);
  color: rgb(255 255 255 / 96%);
  transform: rotateY(180deg);
}

.flip-count {
  display: block;
  max-inline-size: 100%;
  font-size: var(--flip-count-size, 2.75rem);
  font-weight: 300;
  line-height: .95;
  white-space: nowrap;
}

.flip-label {
  display: block;
  margin-block-start: .7em;
  color: rgb(255 255 255 / 58%);
  font-size: .65rem;
  font-weight: 300;
  letter-spacing: .22em;
  line-height: 1;
  text-indent: .22em;
}

@media (prefers-reduced-motion: reduce) {
  .coin-inner {
    will-change: auto;
  }
}

h2 {
  margin-block-start: min(.83em, 5vh);
  margin-block-end: min(.4em, 2.5vh);
  font-family: "Raleway", sans-serif;
  font-size: min(clamp(2rem, 3vw, 2.375rem), 7vh);
  font-weight: 300;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
  word-spacing: -.18em;
}

.icons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: min(clamp(.75rem, 2vw, 1.25rem), 3vh);
  margin-block-start: min(clamp(.25rem, .5vw, .375rem), 1vh);
}

.icons a {
  display: block;
  line-height: 0;
}

.icons img {
  inline-size: min(clamp(3.125rem, 4vw, 5rem), 11vh);
  block-size: auto;
}

@media (max-height: 30rem) {
  .avatar {
    inline-size: min(clamp(9.375rem, 12vw, 18.75rem), 30dvh);
  }

  h2 {
    margin-block: min(.83em, 3vh);
  }

  .icons img {
    inline-size: min(clamp(3.125rem, 4vw, 5rem), 10vh);
  }
}

@media (max-width: 768px) {
  .avatar {
    inline-size: min(clamp(11.25rem, 13.5vw, 21rem), 35dvh);
  }

  h2 {
    font-size: min(clamp(2.25rem, 3.375vw, 2.6875rem), 7vh);
  }

  .icons img {
    inline-size: min(clamp(3.75rem, 4.5vw, 5.625rem), 11vh);
  }
}

@media (max-width: 768px) and (max-height: 30rem) {
  .avatar {
    inline-size: min(clamp(11.25rem, 13.5vw, 21rem), 30dvh);
  }

  .icons img {
    inline-size: min(clamp(3.75rem, 4.5vw, 5.625rem), 10vh);
  }
}
