.mole-shell {
  width: min(1080px, calc(100% - 32px));
}

.game-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
  padding: 30px 34px;
  border-bottom: 3px solid var(--ink);
}

.game-heading .eyebrow {
  margin-bottom: 10px;
}

.game-heading h1 {
  max-width: 790px;
  font-size: clamp(2.7rem, 8vw, 5.7rem);
  line-height: 0.9;
}

.lede {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.timer-box {
  min-width: 166px;
  padding: 16px;
  border: 2px solid var(--line);
  background: #171220;
  text-align: center;
}

.timer-box > span,
.stat > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.timer-box strong {
  color: var(--gold);
  font-size: 1.65rem;
}

.timer-box small {
  margin-left: 5px;
  font-size: 0.78rem;
}

.game-card > .mode-panel {
  margin: 0;
  padding: 20px 24px;
  border-bottom: 3px solid var(--ink);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 3px solid var(--ink);
}

.stat {
  min-width: 0;
  padding: 18px 20px;
  border-right: 2px solid var(--line);
  text-align: center;
}

.stat:last-child {
  border-right: 0;
}

.stat strong {
  color: var(--ink);
  font-size: clamp(1.05rem, 3vw, 1.65rem);
}

.game-stage {
  display: flex;
  min-height: 750px;
  flex-direction: column;
  align-items: center;
  padding: 32px 26px 30px;
  background:
    linear-gradient(rgba(83, 221, 131, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(83, 221, 131, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 50% 45%, #283426 0, transparent 57%);
  background-size: 24px 24px, 24px 24px, auto;
}

.stage-copy {
  min-height: 112px;
  text-align: center;
}

.stage-kicker {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.stage-copy h2 {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2.7rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.stage-copy > p:last-child {
  max-width: 650px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.deadline-track {
  width: min(520px, 92%);
  height: 8px;
  margin: 3px auto 15px;
  overflow: hidden;
  border: 1px solid #5b4c36;
  background: #171220;
}

.deadline-track[hidden] {
  display: block;
  visibility: hidden;
}

.deadline-fill {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(1);
  transform-origin: left center;
  background: var(--gold);
}

.deadline-fill.is-danger {
  background: var(--red);
}

.mole-grid {
  display: grid;
  width: min(570px, 92vw);
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
  margin: 0 auto 17px;
}

.mole-hole {
  position: relative;
  aspect-ratio: 1.16;
  min-width: 0;
  overflow: hidden;
  border: 3px solid #4a3b53;
  border-radius: 0;
  background:
    linear-gradient(180deg, #273328 0 64%, #432d29 64% 100%);
  box-shadow: 5px 5px 0 var(--shadow);
  color: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 70ms ease, box-shadow 70ms ease, border-color 90ms ease, background 90ms ease;
  user-select: none;
}

.mole-hole::before {
  position: absolute;
  right: 10%;
  bottom: 14%;
  left: 10%;
  z-index: 1;
  height: 25%;
  border: 3px solid #1a1116;
  background: #100c14;
  content: "";
  clip-path: polygon(7% 28%, 18% 10%, 82% 10%, 93% 28%, 100% 68%, 88% 91%, 12% 91%, 0 68%);
}

.soil {
  position: absolute;
  right: 5%;
  bottom: 4%;
  left: 5%;
  z-index: 4;
  height: 28%;
  background: #704b36;
  clip-path: polygon(0 46%, 9% 19%, 20% 31%, 30% 7%, 43% 27%, 55% 5%, 68% 29%, 80% 10%, 91% 31%, 100% 17%, 100% 100%, 0 100%);
}

.mole {
  position: absolute;
  right: 24%;
  bottom: -13%;
  left: 24%;
  z-index: 3;
  height: 73%;
  border: 4px solid #281916;
  background: #9a6846;
  box-shadow: inset 7px 0 #b47a52, inset -7px 0 #70452f;
  clip-path: polygon(12% 100%, 4% 69%, 8% 33%, 22% 33%, 22% 17%, 35% 17%, 35% 7%, 65% 7%, 65% 17%, 78% 17%, 78% 33%, 92% 33%, 96% 69%, 88% 100%);
  opacity: 0;
  transform: translateY(64%);
  transition: transform 110ms steps(3, end), opacity 30ms linear;
}

.mole::before,
.mole::after {
  position: absolute;
  top: 31%;
  width: 11%;
  aspect-ratio: 1;
  background: #100c14;
  content: "";
}

.mole::before {
  left: 24%;
}

.mole::after {
  right: 24%;
}

.mole i {
  position: absolute;
  top: 50%;
  left: 39%;
  width: 22%;
  height: 15%;
  background: #ed7180;
  box-shadow: -7px 9px 0 -5px #281916, 7px 9px 0 -5px #281916;
}

.mole-hole.is-target {
  border-color: var(--gold);
  background: linear-gradient(180deg, #304e32 0 64%, #56362b 64% 100%);
}

.mole-hole.is-target .mole,
.mole-hole.is-reveal .mole {
  opacity: 1;
  transform: translateY(0);
}

.mole-hole.is-hit {
  border-color: var(--green);
  background: #1b3a2a;
}

.mole-hole.is-miss {
  border-color: var(--red);
  background: #491b29;
}

.mole-hole:hover {
  border-color: #77647e;
}

.mole-hole:active,
.mole-hole.is-pressed {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--shadow);
}

.mole-hole:focus-visible {
  z-index: 6;
  outline: 4px solid var(--blue);
  outline-offset: 3px;
}

.hole-number {
  position: absolute;
  top: 7px;
  left: 9px;
  z-index: 5;
  color: #8c8494;
  font-size: 0.7rem;
  font-weight: 900;
}

.mole-hole kbd {
  position: absolute;
  right: 7px;
  bottom: 7px;
  z-index: 6;
  width: 25px;
  height: 25px;
  border-width: 1px;
  border-bottom-width: 3px;
  color: #b9b1bf;
  font-size: 0.66rem;
}

.feedback {
  display: flex;
  min-height: 42px;
  margin: 0 0 14px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.feedback[hidden] {
  display: none;
}

.feedback strong {
  color: var(--green);
  font-size: 1.18rem;
}

.feedback span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.game-stage[data-state="playing"] .primary-button {
  visibility: hidden;
}

.game-stage[data-state="game-over"] {
  background-color: #351521;
}

.game-stage[data-state="complete"] {
  background-color: #2d2515;
}

.control-note {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
  text-align: center;
}

.content-section {
  display: grid;
  grid-template-columns: 0.85fr 1.6fr;
  gap: 64px;
  padding: 76px 18px 58px;
}

.content-section h2,
.info-panel h2,
.faq-section h2,
.related-section h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.steps-list {
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--line);
  list-style: none;
}

.steps-list li {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 2px solid var(--line);
}

.steps-list span {
  color: var(--gold);
  font-weight: 800;
}

.steps-list p,
.info-panel p,
.faq-list p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.reading-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.info-panel {
  padding: 30px;
  border: 2px solid var(--line);
  background: var(--panel);
}

.info-panel h2 {
  margin-bottom: 22px;
}

.info-panel > p:not(.section-kicker) + p {
  margin-top: 16px;
}

.faq-section,
.related-section {
  padding: 72px 18px 0;
}

.faq-list {
  margin-top: 28px;
  border-top: 2px solid var(--line);
}

.faq-list details {
  border-bottom: 2px solid var(--line);
}

.faq-list summary {
  padding: 22px 44px 22px 0;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.4;
}

.faq-list details p {
  max-width: 850px;
  padding: 0 0 24px;
}

.related-links {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.related-links a {
  display: flex;
  min-height: 118px;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border: 2px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
}

.related-links a:hover,
.related-links a:focus-visible {
  border-color: var(--gold);
  outline: 0;
}

.related-links small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 400;
}

@media (max-width: 820px) {
  .game-heading {
    grid-template-columns: 1fr;
  }

  .timer-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .timer-box > span {
    margin: 0;
  }

  .related-links {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .mole-shell {
    width: min(100% - 18px, 600px);
    padding-top: 10px;
  }

  .game-heading {
    gap: 20px;
    padding: 24px 18px;
  }

  .game-heading h1 {
    font-size: clamp(2.45rem, 13.4vw, 4rem);
  }

  .game-card > .mode-panel {
    padding-inline: 16px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat:nth-child(2) {
    border-right: 0;
  }

  .stat:nth-child(-n + 2) {
    border-bottom: 2px solid var(--line);
  }

  .game-stage {
    min-height: 655px;
    padding: 26px 9px 24px;
  }

  .stage-copy {
    min-height: 124px;
  }

  .mole-grid {
    width: min(420px, calc(100vw - 42px));
    gap: 8px;
  }

  .mole-hole {
    border-width: 2px;
    box-shadow: 3px 3px 0 var(--shadow);
  }

  .mole {
    border-width: 3px;
  }

  .mole-hole::before {
    border-width: 2px;
  }

  .hole-number {
    top: 5px;
    left: 6px;
    font-size: 0.61rem;
  }

  .mole-hole kbd {
    right: 5px;
    bottom: 5px;
    width: 21px;
    height: 21px;
    font-size: 0.58rem;
  }

  .content-section,
  .reading-grid {
    grid-template-columns: 1fr;
  }

  .content-section {
    gap: 30px;
    padding: 58px 8px 44px;
  }

  .info-panel {
    padding: 24px 20px;
  }

  .faq-section,
  .related-section {
    padding: 58px 8px 0;
  }

  .related-links {
    grid-template-columns: 1fr;
  }

  .related-links a {
    min-height: 92px;
  }
}

@media (max-width: 370px) {
  .mole-grid {
    width: min(330px, calc(100vw - 34px));
    gap: 5px;
  }

  .mole-hole kbd {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mole-hole,
  .mole,
  .deadline-fill {
    transition: none !important;
  }
}
