@font-face {
  font-family: Lilita;
  src: url(/font.woff2);
}
* {
  box-sizing: border-box;
}
:root,
main {
  /* Disable double-tap zoom while allowing scrolling and pinch zoom. */
  touch-action: manipulation;
}
:root {
  --ink: #111438;
  --yellow: #ffe435;
  --purple: #ae78ff;
  color: var(--ink);
  font:
    20px Lilita,
    Arial,
    sans-serif;
}
body {
  margin: 0;
  background:
    radial-gradient(#ffffff24 1px, transparent 2px) 0 0/12px 12px,
    linear-gradient(130deg, #363274, #17163d);
  display: grid;
  place-items: center;
  min-height: 100dvh;
}
main {
  width: min(100%, 580px, 80dvh);
  height: 100dvh;
  container-type: inline-size;
  background-color: #fffefa;
  background-image:
    linear-gradient(#a8bcff52 1px, transparent 1px),
    linear-gradient(90deg, #a8bcff52 1px, transparent 1px);
  background-size: 17px 17px;
  box-shadow: 0 0 60px #070527aa;
  position: relative;
  text-align: center;
  overflow: auto;
}
button,
input {
  font: inherit;
  color: inherit;
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 10px;
  background: white;
  width: 100%;
  min-width: 0;
}
button {
  box-shadow: 3px 5px var(--purple);
  cursor: pointer;
  transition: transform 0.08s;
  line-height: 1.05;
}
button:active:not(:disabled) {
  transform: translate(3px, 4px);
  box-shadow: none;
}
button:disabled {
  cursor: default;
  background: #e2e3ee;
  color: #626688;
  box-shadow: none;
}
button:focus-visible,
button:hover:not(:disabled) {
  outline: 3px solid #7651ed;
  outline-offset: 1px;
}
.primary,
.selected,
.prompt,
.score,
strong,
.combos span:not(:empty) {
  background: var(--yellow);
}
.primary {
  font-size: clamp(24px, 7cqw, 36px);
  text-transform: uppercase;
  transform: rotate(-1deg);
}
.flat {
  background: none;
  border: none;
  box-shadow: none;
  font-size: 18px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.home,
.battle {
  display: grid;
  overflow: hidden;
  grid-template-rows: 49% 51%;
}
nav,
.panel,
.shade > div {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 2.2dvh, 25px);
  padding: 5%;
  align-items: center;
  justify-content: safe center;
}
nav {
  padding: 5% 12%;
  font-size: clamp(21px, 6cqw, 32px);
}
nav button {
  flex: 1;
  max-height: 80px;
}
.arena {
  position: relative;
  overflow: hidden;
  background: linear-gradient(#51cdfc, #a2efff 60%, #fff9c7);
  isolation: isolate;
  border-bottom: 3px solid var(--ink);
}
.cloud,
.cloud:before,
.cloud:after {
  position: absolute;
  content: "";
  width: 25%;
  height: 10%;
  border-radius: 100%;
  background: white;
  top: 36%;
  left: -5%;
  box-shadow:
    7cqw -3cqw white,
    14cqw 0 white,
    77cqw 0 white,
    89cqw -4cqw white,
    97cqw 0 white;
}
.cloud:before {
  height: 180%;
  left: 55%;
  top: -95%;
}
.city {
  position: absolute;
  inset: 52% 0 15%;
  background: repeating-linear-gradient(90deg, #87b2dc 0 3%, #bed9ec 3% 4%);
  clip-path: polygon(
    0 0,
    16% 0,
    16% 55%,
    23% 55%,
    23% 26%,
    36% 26%,
    36% 64%,
    49% 64%,
    49% 42%,
    58% 42%,
    58% 60%,
    70% 60%,
    70% 6%,
    84% 6%,
    84% 38%,
    100% 38%,
    100% 100%,
    0 100%
  );
}
.fence {
  position: absolute;
  inset: 65% 0 15%;
  background:
    repeating-linear-gradient(90deg, #40888b 0 4px, transparent 4px 23%),
    repeating-linear-gradient(45deg, #31778480 0 1px, transparent 1px 9px),
    repeating-linear-gradient(-45deg, #31778480 0 1px, transparent 1px 9px);
  border-block: 5px solid #437d85;
}
.floor {
  position: absolute;
  inset: 79% 0 0;
  background:
    repeating-linear-gradient(0deg, #c8878f 0 1px, transparent 1px 31%),
    repeating-conic-gradient(
      from 260deg at 50% -120%,
      #ecac9b 0 1deg,
      #ffddc9 1deg 16deg
    );
  border-top: 5px solid #fff5dc;
}
.fighter {
  position: absolute;
  width: 43%;
  height: 65%;
  bottom: 2%;
  display: flex;
  align-items: end;
  transform-origin: center bottom;
}
.fighter svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 3px 0 #fff);
}
.fighter:before {
  content: "";
  position: absolute;
  bottom: 2%;
  left: 5%;
  background: #69364a5c;
  width: 85%;
  height: 8%;
  border-radius: 100%;
}
.left {
  left: 1%;
}
.right {
  right: 1%;
  scale: -1 1;
}
.down svg {
  transform: rotate(-72deg) translate(-15%, 8%);
  transition: transform 0.4s;
}
.down:after {
  content: "A B C";
  position: absolute;
  top: 22%;
  left: 20%;
  color: var(--yellow);
  -webkit-text-stroke: 1px var(--ink);
  font-size: 7cqw;
  animation: spin 1.1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.logo {
  position: absolute;
  top: 4%;
  width: 100%;
  text-transform: uppercase;
  transform: rotate(-6deg) skew(-10deg);
  font-size: min(13cqw, 8.2dvh);
  line-height: 0.85;
  color: white;
  -webkit-text-stroke: 1.7cqw var(--ink);
  paint-order: stroke fill;
  text-shadow:
    0 1.4cqw var(--ink),
    0 2.1cqw #9952ee;
}
em {
  font-style: normal;
  color: var(--yellow);
  font-size: 1.14em;
}
.panel {
  padding: 5%;
  overflow-wrap: anywhere;
}
h1,
h2,
h3 {
  margin: 0;
  text-transform: uppercase;
  font-weight: 400;
  line-height: 1.1;
}
h1 {
  font-size: clamp(28px, 9cqw, 50px);
  background: linear-gradient(transparent 45%, var(--yellow) 45%);
  transform: rotate(-3deg);
}
h3 {
  margin-top: 1vh;
}
.row {
  display: flex;
  align-items: stretch;
  gap: 1.4cqw;
  width: 100%;
}
.row button {
  padding: 7px 1px;
  border-radius: 12px;
  font-size: 4.8cqw;
  min-height: 46px;
  box-shadow: 2px 3px var(--purple);
}
.roster button {
  font-size: 4.3cqw;
}
.seats > div {
  width: 50%;
  align-self: center;
}
.seats svg {
  width: 18cqw;
  display: block;
  margin: auto;
}
label {
  width: 100%;
  text-align: left;
}
input {
  margin-top: 6px;
  font: 18px system-ui;
}
img {
  width: min(50%, 24dvh);
  border: 3px solid;
  border-radius: 15px;
}
table,
.review {
  width: 100%;
  background: white;
  border: 3px solid;
  border-radius: 14px;
  padding: 8px;
  font-size: clamp(16px, 4.6cqw, 24px);
  table-layout: fixed;
}
th {
  text-align: left;
  font-weight: 400;
}
td,
th {
  padding: 4px;
}
aside {
  background: #fff1aa;
  padding: 10px;
  border-radius: 10px;
}
.shade {
  position: absolute;
  inset: 0;
  background: #100c3dbb;
  z-index: 8;
  display: grid;
  place-items: center;
}
.shade > div {
  width: 85%;
  background: white;
  border: 4px solid;
  border-radius: 18px;
  font-size: 26px;
}
.battle {
  grid-template-rows: 46% 48% 6%;
}
header {
  position: absolute;
  top: 2%;
  left: 1%;
  right: 1%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hud {
  width: 39%;
  display: flex;
  align-items: center;
  font-size: 3.9cqw;
}
.avatar {
  width: 31%;
  border: 2px solid;
  border-radius: 10px;
  background: white;
  z-index: 1;
  transform: rotate(5deg);
  display: flex;
}
.info {
  width: 72%;
  background: white;
  border: 2px solid;
  border-radius: 7px;
  margin-left: -3%;
  padding: 0 2% 2%;
  line-height: 1;
}
.info div {
  background: var(--ink);
  color: white;
  margin: 0 -4%;
  padding: 2px;
  white-space: nowrap;
  text-transform: uppercase;
}
.hud:last-child {
  flex-direction: row-reverse;
}
.hud:last-child .avatar {
  scale: -1 1;
}
.hud:last-child .info {
  margin: 0 -3% 0 0;
}
meter {
  display: block;
  width: 100%;
  height: 2.8cqw;
  appearance: none;
  border: 1.5px solid;
  border-radius: 4px;
  background: #c5c4d8;
}
meter::-webkit-meter-bar {
  background: none;
  border: 0;
}
meter::-webkit-meter-optimum-value {
  background: #41ed49;
}
.hud:last-child meter::-webkit-meter-optimum-value {
  background: #ff416d;
}
.score {
  font-size: 3.7cqw;
  width: 21%;
  transform: skew(-9deg) rotate(-4deg);
  border: 2px solid;
  text-transform: uppercase;
}
.combos {
  position: absolute;
  inset: 21% 10% auto;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.combos span {
  font-size: min(5cqw, 3dvh);
  transform: rotate(-9deg);
  line-height: 0.9;
  padding: 1% 3%;
  border-radius: 50%;
}
strong {
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translateX(-50%) rotate(-7deg);
  font-size: 9cqw;
  white-space: nowrap;
  padding: 1% 4%;
  border: 3px solid;
  text-transform: uppercase;
}
article {
  display: grid;
  grid-template-rows: 14% 33% 53%;
  padding: 2% 4%;
  min-height: 0;
}
.prompt {
  align-self: center;
  justify-self: center;
  font-size: min(6.3cqw, 4.2dvh);
  line-height: 1.15;
  text-transform: uppercase;
  padding: 0 6%;
  border-radius: 45% 18%;
  transform: rotate(-1deg);
}
.word {
  font-size: min(17cqw, 11dvh);
  display: grid;
  place-items: center;
  white-space: nowrap;
  text-transform: uppercase;
  position: relative;
  min-width: 0;
  line-height: 1;
}
.word:after {
  content: "";
  position: absolute;
  bottom: 7%;
  width: 42%;
  height: 6%;
  border-radius: 50%;
  background: var(--purple);
  transform: rotate(-2deg);
}
.answers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 1.7dvh 3cqw;
  min-height: 0;
}
.answers button {
  font-size: 8cqw;
  padding: 3px;
  min-height: 0;
  border-width: 4px;
  text-transform: capitalize;
}
.answers .yes {
  background: #66ef87;
  color: var(--ink);
}
.answers .no {
  background: #ff7488;
  color: var(--ink);
}
footer {
  display: flex;
  align-items: center;
  justify-content: center;
}
footer button.flat {
  width: auto;
  font-size: 15px;
  padding: 4px 14px;
}
.projectile {
  position: absolute;
  top: 49%;
  font-size: 9cqw;
  animation: fly 0.55s ease-in forwards;
  pointer-events: none;
  z-index: 2;
}
.hit20 {
  font-size: 13cqw;
}
.hit5 {
  color: white;
  -webkit-text-stroke: 2px var(--ink);
}
@keyframes fly {
  from {
    translate: 0;
    rotate: -15deg;
  }
  80% {
    translate: 49cqw;
    rotate: 15deg;
  }
  to {
    translate: 55cqw;
    opacity: 0;
  }
}
.projectile.right {
  animation-name: reverse;
}
@keyframes reverse {
  from {
    translate: 0;
  }
  to {
    translate: -58cqw;
    opacity: 0;
  }
}
@media (max-height: 520px) {
  main {
    width: min(100%, 95dvh);
  }
  nav {
    gap: 8px;
    padding: 3% 10%;
  }
  nav button {
    padding: 2px;
  }
  .panel {
    padding: 16px;
  }
  .arena header {
    top: 0;
  }
  .answers button {
    border-width: 2px;
  }
}
.school {
  position: absolute;
  left: -3%;
  width: 20%;
  top: 39%;
  height: 40%;
  background:
    repeating-linear-gradient(90deg, #ffbaa2 0 8%, transparent 8% 45%),
    linear-gradient(
      #ffcf9e 0 16%,
      #c77d77 16% 20%,
      #92cfed 20% 50%,
      #ffe3d2 50% 55%,
      #659ab4 55%
    );
  border: 3px solid #834c59;
  transform: skewY(21deg);
}
.school:before {
  content: "";
  position: absolute;
  top: -9%;
  left: -5%;
  width: 110%;
  height: 8%;
  background: #fff4d7;
  border: 2px solid #834c59;
}
.fighter svg {
  overflow: visible;
}
.fighter:before {
  height: 5%;
  bottom: 0;
}
.hit20 {
  white-space: nowrap;
}
.super1 {
  animation: avalanche 0.75s both;
}
@keyframes avalanche {
  from {
    top: -30%;
    translate: 47cqw;
  }
  to {
    top: 59%;
    translate: 47cqw;
    opacity: 0;
  }
}
.super2 {
  color: #ffdf22;
  -webkit-text-stroke: 2px var(--ink);
  animation: twister 0.8s both;
}
@keyframes twister {
  to {
    translate: 49cqw;
    rotate: 540deg;
    opacity: 0;
  }
}
.super3 {
  font-size: 18cqw;
}
.projectile.right.super1,
.projectile.right.super2 {
  left: 2%;
  right: auto;
  scale: 1;
}
.projectile.right.super1 {
  animation: avalancheBack 0.75s both;
}
@keyframes avalancheBack {
  from {
    top: -30%;
  }
  to {
    top: 60%;
    opacity: 0;
  }
}
.projectile.right.super2 {
  animation: twisterBack 0.8s both;
}
@keyframes twisterBack {
  from {
    translate: 55cqw;
  }
  to {
    rotate: -540deg;
    opacity: 0;
  }
}
.fightCue {
  position: absolute;
  top: 27%;
  left: 50%;
  transform: translateX(-50%) rotate(-7deg);
  font-size: 9cqw;
  color: var(--yellow);
  text-transform: uppercase;
  -webkit-text-stroke: 1.5cqw var(--ink);
  paint-order: stroke fill;
  pointer-events: none;
}
.info div {
  white-space: normal;
  overflow-wrap: anywhere;
}
.power {
  display: flex;
  align-items: center;
  gap: 2%;
  margin-top: 2px;
  font-size: min(2.65cqw, 1.7dvh);
}
.power i {
  flex: 1;
  height: 0.95em;
  background: #cec9e3;
  border: 1px solid var(--ink);
  border-radius: 2px;
  transform: skew(-10deg);
}
.power .lit {
  background: #ffb521;
}
.charged b {
  color: #b82e00;
}
.charged i:last-child {
  background: white;
  box-shadow: 0 0 4px #ff7200;
}
.combos {
  inset: 30% 24% auto;
}
.combos span {
  font-size: min(3.9cqw, 2.4dvh);
}
.burning svg {
  filter: drop-shadow(0 0 3px #fff379) drop-shadow(0 0 7px #ff5b00);
}
.burning:after {
  content: "🔥";
  position: absolute;
  bottom: 6%;
  left: 4%;
  font-size: 9cqw;
  animation: flicker 0.38s ease-in-out infinite alternate;
  transform-origin: bottom;
}
@keyframes flicker {
  to {
    transform: scale(1.15) rotate(-9deg);
  }
}
.finisher {
  position: absolute;
  top: 52%;
  width: 42%;
  height: 38%;
  display: grid;
  place-items: center;
  background: #ffde36;
  color: #301835;
  font-size: 6cqw;
  clip-path: polygon(
    0 41%,
    20% 35%,
    8% 6%,
    37% 22%,
    47% 0,
    59% 22%,
    90% 3%,
    80% 36%,
    100% 42%,
    82% 57%,
    98% 91%,
    65% 76%,
    56% 100%,
    40% 76%,
    10% 97%,
    20% 62%
  );
  animation: finish 1s 0.29s both;
}
.atRight {
  right: 2%;
}
.atLeft {
  left: 2%;
}
@keyframes finish {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.3);
  }
  18%,
  78% {
    opacity: 1;
    transform: rotate(-9deg) scale(1.1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .burning:after {
    animation: none;
  }
  .finisher {
    animation: none;
  }
}
.home {
  grid-template-rows: 42% 58%;
}
.home nav {
  gap: min(1.55dvh, 14px);
  padding: 3% 9%;
  overflow: auto;
}
.home nav button {
  padding: min(1dvh, 10px) 4px;
}
.home nav .flat {
  font-size: clamp(15px, 4.5cqw, 20px);
}
.training {
  width: 100%;
  height: min(25dvh, 50cqw);
  flex: none;
}
.training .arena {
  height: 100%;
  border: 3px solid;
  border-radius: 18px;
}
.panel > * {
  flex-shrink: 0;
}
.xp,
.gain {
  width: 100%;
  font-size: clamp(16px, 4.4cqw, 22px);
}
.xp {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
progress {
  accent-color: #269558;
  width: 100%;
  min-width: 0;
}
.gain {
  background: var(--yellow);
  padding: 6px;
  border-radius: 10px;
}
.miss {
  color: #a31a3e;
}
.hit {
  color: #12613e;
}
main[data-screen="words"] {
  justify-content: flex-start;
  gap: 12px;
}
main[data-screen="words"] h1 {
  white-space: nowrap;
  font-size: 9cqw;
}
main[data-screen="words"] small,
#list details div {
  font: 15px/1.4 system-ui;
}
main[data-screen="words"] select {
  width: 50%;
  min-height: 42px;
  font: 18px Lilita;
  background: white;
  color: inherit;
  border: 2px solid;
  border-radius: 12px;
  padding: 5px;
}
#list {
  width: 100%;
  display: grid;
  gap: 12px;
  padding-bottom: 18px;
}
#list .row {
  align-items: center;
  white-space: nowrap;
}
#list details {
  background: white;
  border: 3px solid;
  border-radius: 14px;
  padding: 10px;
  text-align: left;
}
#list summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  gap: 10px;
  overflow-wrap: anywhere;
}
#list summary span:last-child {
  width: 40%;
  flex: none;
  font-size: 16px;
  text-align: right;
}
#list summary small,
#list progress {
  display: block;
}
#list details div {
  padding: 6px 0;
  border-top: 1px solid #ddd;
}
#list details div small {
  float: right;
}
.wordsTitle {
  width: 100%;
  position: relative;
}
.wordsTitle button {
  position: absolute;
  left: 0;
  top: 0;
  width: auto;
  padding: 4px 0;
}
.wordsTitle h1 {
  display: inline-block;
}
.home nav .flat {
  box-shadow: none;
}
#list summary span:first-child::after {
  content: "View details ›";
  display: block;
  color: #594393;
  font: 13px system-ui;
}
#list details[open] summary span:first-child::after {
  content: "Hide details";
}
