[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
input,
select,
textarea {
  border: 2px solid #e5deed;
  border-radius: 12px;
  padding: 13px 15px;
  background: #fff;
  color: #3c304a;
  outline: none;
  width: 100%;
}
input:focus,
textarea:focus {
  border-color: var(--accent);
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 16px 0 8px;
}
label input,
label select {
  margin-top: 7px;
}
.app-button {
  background: var(--accent);
  color: white;
  border: 0;
  border-bottom: 4px solid var(--accent-dark);
  border-radius: 12px;
  padding: 13px 20px;
  font-weight: 700;
  cursor: pointer;
}
.app-button:disabled {
  opacity: 0.5;
}
.screen {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  background: #fffdf9;
  padding: 26px 30px;
}
.wordmark {
  font:
    800 46px "Outfit",
    sans-serif;
  letter-spacing: -3px;
  color: #252337;
  text-decoration: none;
}
.wordmark span {
  color: #8056c5;
  margin-left: 5px;
}
.welcome {
  max-width: 420px;
  margin: 0 auto;
  padding: 24px 0 50px;
}
.welcome h1 {
  font-size: 48px;
  line-height: 1.1;
  margin: 25px 0 18px;
}
.welcome p {
  font-size: 15px;
  line-height: 1.7;
  color: #8b7f94;
}
.welcome-cats {
  height: 150px;
  background: url(battle-cast.png) center 0/280px 280px no-repeat;
}
.welcome form {
  max-width: 350px;
}
.welcome .app-button {
  width: 100%;
  margin-top: 20px;
}
.home-wrap {
  max-width: 960px;
  margin: auto;
}
.home-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.home-stats {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 12px;
  font-weight: 700;
  color: #8a6aac;
}
.icon-button {
  background: transparent;
  border: 0;
  color: #8c7c9c;
  font-size: 24px;
  padding: 8px;
  cursor: pointer;
}
.home-nav {
  display: flex;
  gap: 25px;
  border-bottom: 1px solid #e9e1ed;
  margin: 22px 0 30px;
}
.home-nav button {
  background: none;
  border: 0;
  padding: 14px 3px;
  color: #96869f;
  font-weight: 700;
  cursor: pointer;
}
.home-nav .chosen {
  color: #8056c5;
  border-bottom: 3px solid #8056c5;
}
.hero-copy h1 {
  font-size: 52px;
  margin: 15px 0;
}
.hero-copy p,
.muted {
  color: #998aa5;
  font-size: 14px;
  line-height: 1.7;
}
.app-eyebrow {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #9274b7;
  font-weight: 800;
}
.topic-form {
  display: flex;
  gap: 12px;
  margin: 25px 0 14px;
  max-width: 650px;
}
.topic-form input {
  flex: 1;
  min-width: 0;
}
.topic-form button {
  white-space: nowrap;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 35px;
}
.chips button {
  border: 1px solid #e4d9ef;
  background: #f7f1ff;
  border-radius: 30px;
  padding: 8px 13px;
  font-size: 12px;
  color: #896da5;
  cursor: pointer;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-title h2 {
  font-size: 22px;
  min-height: 0;
  margin: 0 0 17px;
  display: block;
}
.section-title span {
  color: #a191ad;
  font-size: 11px;
}
.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.topic-card {
  position: relative;
  background: #fff;
  border: 2px solid #eae3ef;
  border-bottom: 5px solid #e3daeb;
  border-radius: 18px;
  padding: 23px 20px;
  text-align: left;
  cursor: pointer;
  min-height: 140px;
}
.topic-card:hover {
  border-color: #bda2df;
}
.topic-card h3 {
  font: 600 20px "Outfit";
  margin: 7px 0 18px;
  color: #4b3c5e;
}
.topic-card span {
  font-size: 11px;
  color: #a38ab6;
}
.topic-card .arrow {
  position: absolute;
  right: 18px;
  bottom: 16px;
  color: #9b78c5;
  font-size: 20px;
}
.home-party {
  height: 280px;
  width: 300px;
  margin: 30px auto 0;
  background: url(battle-cast.png) center/contain no-repeat;
  opacity: 0.85;
}
.skill-row {
  padding: 20px;
  background: white;
  border: 1px solid #eadff1;
  border-radius: 15px;
  margin: 12px 0;
}
.skill-row h3 {
  font: 600 19px "Outfit";
  margin: 0 0 14px;
}
.skill-meter {
  height: 8px;
  background: #eee4f6;
  border-radius: 8px;
  overflow: hidden;
}
.skill-meter i {
  height: 100%;
  background: #a57cdb;
  display: block;
}
.skill-row small {
  color: #9c8ca9;
  line-height: 1.7;
}
.league-row {
  display: flex;
  gap: 20px;
  align-items: center;
  background: white;
  border: 1px solid #e9e0ef;
  border-radius: 13px;
  padding: 20px;
  margin: 10px 0;
}
.league-row strong {
  margin-left: auto;
  color: #8c65bb;
}
.league-row.you {
  border-color: #af8ad8;
  background: #f8f0ff;
}
#lessonScreen header {
  display: flex;
  gap: 12px;
}
#homeButton {
  position: fixed;
  left: 18px;
  top: 13px;
}
#skillTitle {
  font-size: 24px;
}
#counter {
  max-width: 100px;
  white-space: nowrap;
}
#typedAnswer {
  padding-bottom: 15px;
}
#typedAnswer textarea {
  resize: vertical;
  min-height: 90px;
  font-size: 15px;
}
#typedAnswer button {
  display: block;
  margin: 12px 0 0 auto;
}
.report-button {
  font-size: 10px;
  color: #a798ae;
  border: 0;
  background: none;
  padding: 15px 0;
  cursor: pointer;
}
#help h3 {
  font-size: 16px;
  margin: 0 0 10px;
}
#help p {
  line-height: 1.7;
}
.diagram {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 16px 0;
}
.diagram-step {
  border: 1px solid #e8d4a6;
  border-radius: 10px;
  padding: 10px;
  background: #fffcf2;
  font-size: 12px;
}
.diagram-step:not(:last-child):after {
  content: "↓";
  display: block;
  text-align: center;
  color: #c39b4c;
  margin-bottom: -9px;
  transform: translateY(7px);
}
#toast {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: #39294b;
  color: white;
  padding: 12px 20px;
  border-radius: 12px;
  z-index: 100;
  max-width: 90%;
  font-size: 13px;
  display: none;
}
#toast.visible {
  display: block;
}
dialog {
  width: min(480px, 94vw);
  max-height: 90dvh;
  overflow: auto;
}
dialog h2 {
  margin: 0;
  min-height: 0;
  font-size: 24px;
  display: block;
}
.dialog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.check-label {
  display: flex;
  gap: 10px;
  font-size: 12px;
  line-height: 1.6;
  font-weight: 400;
}
.check-label input {
  width: auto;
  flex: none;
  margin: 4px 0 auto;
}
.settings-links {
  display: grid;
  gap: 12px;
  margin-top: 30px;
}
.settings-links button {
  background: none;
  border: 0;
  color: #9984a9;
  text-align: left;
  font-size: 12px;
  padding: 0;
  cursor: pointer;
}
#deleteButton {
  color: #ad6b75;
}
.answer.ack:after {
  content: "Okay — click to continue" !important;
  color: #a54b3a;
}
.answer.confirm:after {
  content: "Click again to answer";
  display: block;
  flex-basis: 100%;
  padding-left: 43px;
  font-size: 11px;
  color: var(--accent-dark);
}
.answer.confirm,
.answer.ack {
  flex-wrap: wrap;
}
.answer.ack.correct:after {
  color: var(--accent-dark);
}
.answer:disabled {
  cursor: default;
}
.answer.ack {
  cursor: pointer;
}
@media (pointer: coarse) {
  .answer.confirm:after {
    content: "Tap again to answer";
  }
  .answer.ack:after {
    content: "Okay — tap to continue" !important;
  }
}
@media (max-width: 800px) {
  .screen {
    padding: 20px;
  }
  .home-stats {
    gap: 12px;
    font-size: 10px;
  }
  .hero-copy h1 {
    font-size: 42px;
  }
  .topic-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .topic-card {
    padding: 16px;
    min-height: 125px;
  }
  .topic-card h3 {
    font-size: 18px;
  }
  .topic-form {
    gap: 8px;
  }
  .topic-form .app-button {
    padding: 12px;
  }
  #skillTitle {
    font-size: 20px;
  }
  .home-party {
    height: 210px;
    width: 240px;
  }
  #homeButton {
    left: 7px;
    top: 3px;
  }
}
@media (max-width: 360px) {
  .topic-grid {
    grid-template-columns: 1fr;
  }
  .home-stats {
    gap: 6px;
  }
}
/* The rival is the only child of its stage; keep it visible. */
.rivals .rival:first-child {
  display: block !important;
}
.workspace {
  grid-template-rows: min-content minmax(0, 1fr);
}
.answer.incorrect {
  background: #fff0ed !important;
  border-color: #e9a394 !important;
  color: #a54b3a !important;
}
.answer.correct:not(.incorrect) {
  background: #e9f8ef !important;
  border-color: #71bb90 !important;
  color: #257c49 !important;
}
.counter {
  overflow: hidden;
  text-overflow: ellipsis;
}
.answers .answer {
  transition:
    background-color 0.16s,
    border-color 0.16s;
}
.welcome h1 {
  display: block;
}
.home-wrap > div > h1 {
  display: block;
}
