body {
  background: radial-gradient(ellipse at 60% 15%, #534657, transparent 53%), #202e3a;
}
.trials-hero {
  margin-top: 18px;
  position: relative;
  min-height: 230px;
  aspect-ratio: 2.85;
  display: flex;
  align-items: center;
  padding: clamp(20px, 4vw, 46px);
  border: 1px solid #918b80;
  border-radius: 14px;
  background:
    linear-gradient(90deg, #202330e8, transparent 80%),
    url(assets/lantern-trials.webp) center 48% / cover;
}
.trials-hero h1 {
  font: 700 clamp(40px, 5.4vw, 70px)/1 var(--pixel);
  margin: 5px 0;
  color: #ffedb9;
}
.trials-hero div {
  max-width: 52%;
}
.trials-hero p {
  margin: 5px 0 14px;
  color: #fff4dc;
}
.arena-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.arena-list a {
  display: block;
  background: #2e3b48;
  padding: 13px;
  border: 1px solid #7b8583;
  text-decoration: none;
  border-radius: 10px;
}
.arena-list strong {
  display: block;
  font: 700 23px var(--pixel);
}
.arena-list small {
  color: #d5dfd9;
}
.game-grid .trialboard {
  min-width: 0;
  overflow: hidden;
  background: #283c43;
  border: 1.5px solid #787e7b;
  border-radius: 12px;
}
.trailtop {
  display: flex;
  align-items: center;
  gap: 10px;
  background:
    linear-gradient(90deg, #202b33eb, #384138bd),
    url(assets/lantern-trials.webp) center 42% / cover;
  padding: 12px 16px;
  min-height: 67px;
}
.trailtop .face {
  width: 47px;
  height: 47px;
}
.trailtop b {
  display: block;
  font: 700 21px var(--pixel);
  color: #ffdb8c;
}
.trailtop p {
  margin: 0;
  color: #f1efde;
}
.work-area {
  padding: 13px 16px;
}
.work-area h2 {
  font: 700 25px var(--pixel);
  margin: 3px 0 8px;
}
.work-area h3 {
  font: 700 18px var(--pixel);
  margin: 8px 0 3px;
}
.work-area p {
  margin: 6px 0;
}
.stone-row,
.scout-pile,
.trailtools {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
  margin: 7px 0;
}
.stone {
  border: 2px solid #9ab2a3;
  box-shadow: 0 3px 0 #6b8a7e;
  background: linear-gradient(#e1e9c8, #bfd5aa);
  color: #374b3d;
  min-width: 56px;
  min-height: 48px;
  font: 700 26px var(--pixel);
}
.stone.marked {
  border-color: #ffce7c;
  background: #ffde9e;
  box-shadow: 0 3px 0 #b9924e;
}
.mathop {
  width: 41px;
  height: 39px;
  padding: 0;
  font: 700 23px var(--pixel);
}
.workspace {
  padding: 10px 12px;
  background: #1c303a;
  border-radius: 8px;
  border: 1px solid #586e72;
  margin: 8px 0;
}
.workspace .case {
  display: inline-block;
}
.peg {
  padding: 7px 9px;
  border: 1px solid #b3a481;
  background: #eadbb5;
  color: #3d4341;
  border-radius: 6px;
}
.peg.selected,
.options .selected {
  background: #ffdb91;
  border-color: #cba062;
  color: #334038;
}
.peg.used {
  background: #a9c4aa;
}
.bin {
  border: 2px dashed #b6bd98;
  border-radius: 9px;
  min-width: 70px;
  padding: 7px;
  flex: 1;
  background: #344b48;
  text-align: center;
}
.bin button {
  display: block;
  margin: auto;
}
.bin small {
  display: block;
}
.scrolls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 8px;
}
.scroll {
  background: #f8e8c8;
  color: #443d36;
  padding: 9px;
  border: 2px solid #b39666;
  border-radius: 8px;
}
.scroll strong {
  display: block;
  font: 700 19px var(--pixel);
  margin-bottom: 5px;
}
.scroll p {
  font-weight: 900;
}
.scroll button {
  padding: 4px 6px;
  font-size: 0.83rem;
}
.scroll .selected {
  background: #d3e4b8;
  color: #384b38;
}
.quizfield {
  padding: 6px 8px;
  font: inherit;
  max-width: 100px;
}
.feedback {
  padding: 10px 15px;
  background: #f2eacf;
  color: #33473f;
  min-height: 42px;
  font-weight: 850;
}
.boardfoot {
  padding: 8px 14px;
  background: #27343f;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.boardfoot a:last-child {
  margin-left: auto;
}
.disclosure {
  font-size: 0.85rem;
  color: #c8d9ce;
}
.work-area .target {
  font: 700 30px var(--pixel);
  color: #ffdf95;
}
.clues {
  color: #d6d6b9;
  font-size: 0.86rem;
}
.terminal {
  border-left: 3px solid #b4b28b;
  padding-left: 8px;
}
.work-area button:disabled {
  opacity: 0.55;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
@media (max-width: 800px) {
  .arena-list {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .trials-hero {
    aspect-ratio: auto;
    min-height: 225px;
  }
  .trials-hero div {
    max-width: 80%;
  }
  .scrolls {
    grid-template-columns: 1fr;
  }
  .work-area {
    padding: 10px;
  }
  .stone {
    min-width: 43px;
    min-height: 43px;
  }
  .arena-list strong {
    font-size: 19px;
  }
}
