:root {
  --ink: #090b09;
  --bone: #e9dfc5;
  --moss: #78d83b;
  --acid: #b7ff5a;
  --blood: #b82e36;
  --gold: #d8b35c;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
  color: var(--bone);
}

body {
  font-family: "IM Fell English", Georgia, serif;
  touch-action: none;
  user-select: none;
}

button {
  font: inherit;
}

.game-shell,
#gameCanvas {
  width: 100%;
  height: 100%;
}

.game-shell {
  position: relative;
  isolation: isolate;
  background: #101712;
}

#gameCanvas {
  display: block;
}

.game-shell::after {
  position: absolute;
  z-index: 30;
  inset: 0;
  border: clamp(5px, 1vw, 12px) solid rgba(4, 5, 4, 0.88);
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.72);
  pointer-events: none;
  content: "";
}

.hud {
  position: absolute;
  z-index: 10;
  top: 24px;
  left: 50%;
  display: grid;
  grid-template-columns: minmax(160px, 230px) auto 76px 76px;
  gap: 20px;
  width: min(94vw, 820px);
  align-items: start;
  transform: translateX(-50%);
  text-shadow: 0 2px 4px #000;
}

.hud-label,
.timer-block span,
.kills-block span,
.coins-block span {
  display: block;
  margin-bottom: 3px;
  color: #b7ae99;
  font: 700 10px/1 "Cinzel", serif;
  letter-spacing: 0.2em;
}

.health-wrap strong,
.kills-block strong,
.coins-block strong {
  font: 700 12px "Cinzel", serif;
}

.bar {
  overflow: hidden;
  height: 9px;
  border: 1px solid rgba(233, 223, 197, 0.55);
  background: rgba(3, 5, 3, 0.8);
  box-shadow: 0 2px 8px #000;
}

.bar i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #6f171d, var(--blood));
  transition: width 0.2s;
}

.timer-block {
  min-width: 94px;
  text-align: center;
}

.timer-block strong {
  font: 800 24px/1 "Cinzel", serif;
  letter-spacing: 0.06em;
}

.kills-block,
.coins-block {
  text-align: right;
}

.kills-block strong,
.coins-block strong {
  font-size: 20px;
}

.coins-block strong {
  color: var(--gold);
}

.xp-hud {
  position: absolute;
  z-index: 10;
  bottom: 17px;
  left: 50%;
  display: grid;
  grid-template-columns: 82px 1fr 50px;
  gap: 9px;
  width: min(92vw, 620px);
  align-items: center;
  transform: translateX(-50%);
  font: 700 10px "Cinzel", serif;
  text-shadow: 0 2px 4px #000;
}

.xp-bar {
  height: 11px;
}

.xp-bar i {
  width: 0;
  background: linear-gradient(90deg, #498b2b, var(--acid));
  box-shadow: 0 0 12px var(--moss);
}

.version-label {
  position: absolute;
  z-index: 31;
  right: 22px;
  bottom: 18px;
  color: rgba(233, 223, 197, 0.48);
  font: 700 9px "Cinzel", serif;
  letter-spacing: 0.1em;
  pointer-events: none;
}

.arsenal {
  position: absolute;
  z-index: 10;
  top: 92px;
  left: 22px;
  display: grid;
  gap: 7px;
}

.weapon-chip {
  display: flex;
  width: 47px;
  height: 47px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(233, 223, 197, 0.5);
  background: rgba(5, 8, 5, 0.72);
  box-shadow: 0 4px 14px #0008;
  color: var(--acid);
  font: 700 22px "Cinzel", serif;
}

.weapon-chip small {
  position: absolute;
  margin: 34px 0 0 36px;
  color: var(--gold);
  font: 700 9px "Cinzel", serif;
  text-shadow: 0 1px #000;
}

.screen {
  position: absolute;
  z-index: 20;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 26px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 30%, rgba(77, 111, 70, 0.2), transparent 35%),
    linear-gradient(rgba(3, 6, 4, 0.66), rgba(3, 5, 3, 0.93));
  backdrop-filter: blur(3px);
}

.screen.hidden {
  display: none;
}

.intro-screen {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 31%, rgba(183, 255, 90, 0.12), transparent 19%),
    linear-gradient(115deg, rgba(2, 5, 3, 0.95), rgba(12, 24, 15, 0.82), rgba(2, 5, 3, 0.95));
}

.intro-screen::before,
.intro-screen::after {
  position: absolute;
  z-index: -1;
  bottom: -8vh;
  width: 45vw;
  height: 88vh;
  opacity: 0.42;
  background: repeating-linear-gradient(82deg, transparent 0 7%, #050805 7.5% 9%, transparent 10% 14%);
  clip-path: polygon(0 100%, 9% 40%, 15% 70%, 25% 4%, 32% 65%, 50% 18%, 57% 68%, 71% 0, 80% 70%, 92% 31%, 100% 100%);
  content: "";
}

.intro-screen::before {
  left: -2vw;
}

.intro-screen::after {
  right: -2vw;
  transform: scaleX(-1);
}

.moon-seal {
  position: relative;
  display: grid;
  width: 102px;
  height: 102px;
  margin-bottom: -8px;
  place-items: center;
  border: 1px solid #73915c;
  border-radius: 50%;
  color: var(--acid);
  box-shadow: 0 0 50px rgba(120, 216, 59, 0.17);
  font: 76px/1 Georgia, serif;
}

.moon-seal::after {
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(183, 255, 90, 0.35);
  border-radius: inherit;
  content: "";
  animation: turn 18s linear infinite;
}

.eyebrow,
.level-heading p {
  margin: 15px 0 5px;
  color: var(--moss);
  font: 700 10px "Cinzel", serif;
  letter-spacing: 0.32em;
}

h1,
h2 {
  margin: 0;
  font-family: "Cinzel", serif;
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.82;
  text-shadow: 0 8px 24px #000;
}

h1 {
  font-size: clamp(48px, 9vw, 108px);
}

h1 em {
  color: transparent;
  -webkit-text-stroke: 1px var(--bone);
  font-style: normal;
}

.starting-weapon {
  display: flex;
  gap: 12px;
  margin: 22px 0 18px;
  align-items: center;
  text-align: left;
}

.weapon-rune {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid #6f8e55;
  background: #101a11;
  color: var(--acid);
  font: 700 28px "Cinzel", serif;
}

.starting-weapon b,
.starting-weapon small {
  display: block;
  font-family: "Cinzel", serif;
}

.starting-weapon b {
  font-size: 13px;
}

.starting-weapon small {
  margin-top: 3px;
  color: var(--gold);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.primary-btn {
  position: relative;
  min-width: 220px;
  padding: 14px 24px;
  border: 1px solid var(--acid);
  background: var(--moss);
  color: #10170d;
  box-shadow: 5px 5px 0 #203619, 0 0 28px rgba(120, 216, 59, 0.18);
  cursor: pointer;
  font: 800 13px "Cinzel", serif;
  letter-spacing: 0.1em;
  transition: transform 0.15s, box-shadow 0.15s;
}

.primary-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 #203619, 0 0 35px rgba(120, 216, 59, 0.28);
}

.menu-actions {
  display: flex;
  align-items: center;
  flex-direction: column;
}

.menu-btn {
  margin-top: 18px;
  padding: 9px 18px;
  border: 0;
  border-bottom: 1px solid #787264;
  background: transparent;
  color: #aaa391;
  cursor: pointer;
  font: 700 10px "Cinzel", serif;
  letter-spacing: 0.15em;
  transition: color 0.15s, border-color 0.15s;
}

.menu-btn:hover {
  border-color: var(--bone);
  color: var(--bone);
}

.controls {
  margin: 17px 0 0;
  color: #817d72;
  font: 600 9px "Cinzel", serif;
  letter-spacing: 0.12em;
}

.bestiary-screen {
  overflow-y: auto;
  justify-content: flex-start;
  padding-top: clamp(35px, 7vh, 72px);
  background:
    radial-gradient(circle at 50% 8%, rgba(117, 160, 84, 0.2), transparent 30%),
    linear-gradient(rgba(3, 6, 4, 0.94), rgba(3, 5, 3, 0.98));
}

.bestiary-heading h2 {
  font-size: clamp(44px, 7vw, 78px);
}

.bestiary-heading .eyebrow {
  margin-top: 0;
}

.bestiary-heading > span {
  display: block;
  margin-top: 16px;
  color: #a49c88;
  font-size: 14px;
  font-style: italic;
}

.bestiary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 255px));
  gap: 15px;
  width: min(94vw, 1065px);
  margin: 28px auto 8px;
}

.beast-card {
  position: relative;
  display: grid;
  grid-template-columns: 74px 1fr;
  padding: 15px;
  overflow: hidden;
  border: 1px solid #555747;
  background: linear-gradient(145deg, rgba(24, 33, 23, 0.96), rgba(8, 11, 8, 0.98));
  text-align: left;
}

.beast-card::before {
  position: absolute;
  top: 0;
  right: 0;
  width: 34px;
  height: 34px;
  border-top: 1px solid rgba(183, 255, 90, 0.3);
  border-right: 1px solid rgba(183, 255, 90, 0.3);
  content: "";
}

.beast-portrait {
  display: block;
  grid-row: 1 / 2;
  width: 62px;
  height: 72px;
  border: 1px solid #4a5c3d;
  background: #0b110c;
}

.beast-copy {
  align-self: center;
}

.beast-number {
  margin: 0 0 3px;
  color: var(--moss);
  font: 700 8px "Cinzel", serif;
  letter-spacing: 0.16em;
}

.beast-copy h3 {
  margin: 0;
  font: 700 16px "Cinzel", serif;
}

.beast-card dl {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, 1fr);
  margin: 15px 0 10px;
  border-top: 1px solid #3c4035;
  border-bottom: 1px solid #3c4035;
}

.beast-card dl div {
  padding: 9px 5px;
  border-right: 1px solid #3c4035;
}

.beast-card dl div:last-child {
  border: 0;
}

.beast-card dt {
  color: #817b6c;
  font: 700 8px "Cinzel", serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.beast-card dd {
  margin: 3px 0 0;
  color: var(--bone);
  font: 700 18px "Cinzel", serif;
}

.beast-note {
  grid-column: 1 / -1;
  min-height: 38px;
  margin: 0;
  color: #aaa28e;
  font-size: 12px;
  line-height: 1.35;
}

.bestiary-back {
  margin-bottom: 36px;
}

.collection-screen {
  overflow-y: auto;
  justify-content: flex-start;
  padding: clamp(34px, 6vh, 64px) 4vw 42px;
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(216, 179, 92, 0.08) 50%, transparent 50.2%),
    radial-gradient(circle at 50% 5%, rgba(216, 179, 92, 0.2), transparent 27%),
    linear-gradient(145deg, rgba(3, 6, 4, 0.97), rgba(8, 11, 8, 0.99));
}

.collection-heading {
  width: min(94vw, 1100px);
  margin: 0 auto;
  text-align: center;
}

.collection-heading h2 {
  color: var(--bone);
  font-size: clamp(42px, 7vw, 76px);
}

.collection-heading > span {
  display: block;
  margin-top: 17px;
  color: #98917f;
  font-size: 14px;
  font-style: italic;
}

.collection-ledger {
  display: grid;
  gap: 32px;
  width: min(94vw, 1100px);
  margin: 34px auto 0;
}

.collection-group-heading {
  display: flex;
  margin-bottom: 12px;
  padding-bottom: 8px;
  align-items: end;
  justify-content: space-between;
  border-bottom: 1px solid rgba(216, 179, 92, 0.45);
}

.collection-group-heading h3,
.collection-group-heading span {
  margin: 0;
  font-family: "Cinzel", serif;
  letter-spacing: 0.16em;
}

.collection-group-heading h3 {
  color: var(--bone);
  font-size: 13px;
}

.collection-group-heading span {
  color: var(--gold);
  font-size: 10px;
}

.collection-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.collection-card {
  position: relative;
  min-height: 156px;
  overflow: hidden;
  border: 1px solid #3d4237;
}

.collection-card.is-discovered {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 13px;
  padding: 17px;
  background:
    linear-gradient(135deg, rgba(120, 216, 59, 0.08), transparent 48%),
    #0d120e;
  box-shadow: inset 0 0 30px rgba(183, 255, 90, 0.025);
}

.collection-card.is-discovered::after {
  position: absolute;
  right: -19px;
  bottom: -22px;
  width: 70px;
  height: 70px;
  border: 1px solid rgba(216, 179, 92, 0.18);
  transform: rotate(45deg);
  content: "";
}

.collection-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid #6f8e55;
  background: #101a11;
  color: var(--acid);
  box-shadow: 0 0 20px rgba(120, 216, 59, 0.12);
  font: 800 25px "Cinzel", serif;
}

.collection-found {
  color: var(--moss);
  font: 700 8px "Cinzel", serif;
  letter-spacing: 0.18em;
}

.collection-card h4 {
  margin: 5px 0 8px;
  color: var(--bone);
  font: 700 13px/1.25 "Cinzel", serif;
}

.collection-card p {
  margin: 0;
  color: #9c9583;
  font-size: 12px;
  line-height: 1.35;
}

.collection-card.is-unknown {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  border-color: #252825;
  background:
    radial-gradient(circle, rgba(34, 39, 34, 0.5), transparent 52%),
    #010201;
  color: #4e534d;
}

.collection-unknown-mark {
  color: #747a72;
  text-shadow: 0 0 18px rgba(233, 223, 197, 0.12);
  font: 800 54px/1 "Cinzel", serif;
}

.collection-card.is-unknown span {
  font: 700 8px "Cinzel", serif;
  letter-spacing: 0.24em;
}

.evolution-collection,
.xp-collection {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.collection-back {
  margin: 34px 0 0;
}

.shop-screen {
  overflow-y: auto;
  justify-content: flex-start;
  padding-top: clamp(30px, 5vh, 58px);
  background:
    radial-gradient(circle at 72% 6%, rgba(216, 179, 92, 0.15), transparent 24%),
    linear-gradient(rgba(3, 6, 4, 0.96), rgba(3, 5, 3, 0.99));
}

.shop-heading {
  display: flex;
  width: min(94vw, 920px);
  align-items: end;
  justify-content: space-between;
  text-align: left;
}

.shop-heading .eyebrow {
  margin-top: 0;
}

.shop-heading h2 {
  font-size: clamp(44px, 7vw, 72px);
}

.shop-wallet {
  min-width: 130px;
  padding: 11px 15px;
  border: 1px solid #746238;
  background: rgba(31, 27, 15, 0.72);
  text-align: right;
}

.shop-wallet span,
.shop-wallet strong {
  display: block;
}

.shop-wallet span {
  color: #9e9275;
  font: 700 8px "Cinzel", serif;
  letter-spacing: 0.14em;
}

.shop-wallet strong {
  margin-top: 4px;
  color: var(--gold);
  font: 800 24px "Cinzel", serif;
}

.shop-content {
  width: min(94vw, 920px);
  margin-top: 24px;
}

.shop-section-heading {
  display: flex;
  margin-bottom: 10px;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid #3f4237;
  text-align: left;
}

.shop-section-heading h3 {
  margin: 0 0 7px;
  color: var(--bone);
  font: 700 12px "Cinzel", serif;
  letter-spacing: 0.16em;
}

.shop-section-heading span {
  color: #827c6d;
  font-size: 12px;
  font-style: italic;
}

.character-shop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.character-card {
  position: relative;
  padding: 15px;
  border: 1px solid #4a4d40;
  background: linear-gradient(150deg, rgba(26, 34, 24, 0.98), rgba(8, 11, 8, 0.98));
  text-align: left;
}

.character-card.is-selected {
  border-color: var(--acid);
  box-shadow: inset 0 0 22px rgba(120, 216, 59, 0.08);
}

.character-card.is-locked .character-portrait {
  filter: grayscale(0.85);
  opacity: 0.58;
}

.selected-ribbon {
  position: absolute;
  top: 0;
  right: 0;
  padding: 4px 7px;
  background: var(--moss);
  color: #10170d;
  font: 800 7px "Cinzel", serif;
  letter-spacing: 0.12em;
}

.character-portrait {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 13px;
  place-items: center;
  border: 1px solid var(--character-color, #59634c);
  border-radius: 50%;
  background: color-mix(in srgb, var(--character-color, #59634c) 18%, #090c09);
  color: var(--character-color, var(--acid));
  font: 800 27px "Cinzel", serif;
  box-shadow: 0 0 18px color-mix(in srgb, var(--character-color, #59634c) 20%, transparent);
}

.character-card h4 {
  min-height: 34px;
  margin: 0;
  font: 700 13px/1.25 "Cinzel", serif;
}

.character-weapon {
  min-height: 28px;
  margin: 7px 0 10px;
  color: var(--moss);
  font-size: 12px;
}

.character-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: 0 0 12px;
  border-top: 1px solid #393d33;
  border-bottom: 1px solid #393d33;
}

.character-stats div {
  padding: 7px 3px;
}

.character-stats span,
.character-stats strong {
  display: block;
}

.character-stats span {
  color: #817b6c;
  font: 700 7px "Cinzel", serif;
  letter-spacing: 0.08em;
}

.character-stats strong {
  margin-top: 2px;
  font: 700 14px "Cinzel", serif;
}

.shop-buy-button,
.powerup-action button {
  width: 100%;
  padding: 9px 6px;
  border: 1px solid #7aa957;
  background: #365d29;
  color: #eaf5de;
  cursor: pointer;
  font: 700 9px "Cinzel", serif;
  letter-spacing: 0.08em;
}

.shop-buy-button:hover,
.powerup-action button:hover {
  border-color: var(--acid);
  background: #477b34;
}

.shop-buy-button:disabled,
.powerup-action button:disabled {
  border-color: #3e4138;
  background: #22261f;
  color: #696c62;
  cursor: not-allowed;
}

.powerup-heading {
  margin-top: 24px;
}

.powerup-card {
  display: grid;
  grid-template-columns: 68px 1fr 180px;
  gap: 15px;
  padding: 15px;
  align-items: center;
  border: 1px solid #66592f;
  background: linear-gradient(100deg, rgba(44, 39, 20, 0.9), rgba(10, 13, 9, 0.98));
  text-align: left;
}

.powerup-card + .powerup-card {
  margin-top: 10px;
}

.powerup-icon {
  display: grid;
  width: 60px;
  height: 60px;
  place-items: center;
  border: 1px solid #a98c3d;
  background: #211d0e;
  font-size: 30px;
}

.exercise-icon {
  border-color: #8f4d45;
  background: #241211;
  color: #e78b79;
}

.regeneration-icon {
  border-color: #497e55;
  background: #102116;
  color: #73df8d;
}

.enlargement-icon {
  border-color: #55798e;
  background: #101b22;
  color: #7ec6e9;
}

.area-damage-icon {
  border-color: #8e5d3f;
  background: #24170f;
  color: #f3a85e;
}

.powerup-copy h4 {
  margin: 0;
  font: 700 15px "Cinzel", serif;
}

.powerup-copy p {
  margin: 4px 0;
  color: #aaa28e;
  font-size: 13px;
}

.powerup-level {
  color: var(--gold);
  font: 700 16px "Cinzel", serif;
  letter-spacing: 0.1em;
}

.powerup-action span {
  display: block;
  margin-bottom: 7px;
  color: #b6ad95;
  font-size: 12px;
  text-align: center;
}

.shop-back {
  margin-bottom: 36px;
}

.level-heading p {
  margin: 0 0 8px;
}

.level-heading h2,
.gameover-screen h2 {
  font-size: clamp(44px, 7vw, 78px);
}

.level-heading span {
  display: block;
  margin: 14px 0 26px;
  color: #aaa28e;
  font-style: italic;
}

.choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 250px));
  gap: 15px;
  width: min(94vw, 790px);
}

.choice-card {
  position: relative;
  min-height: 280px;
  padding: 24px 18px 20px;
  overflow: hidden;
  border: 1px solid #726c59;
  background: linear-gradient(160deg, rgba(30, 40, 28, 0.97), rgba(7, 10, 7, 0.98));
  color: var(--bone);
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s, border-color 0.18s, background 0.18s;
}

.choice-card::after {
  position: absolute;
  right: -30px;
  bottom: -42px;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(183, 255, 90, 0.17);
  border-radius: 50%;
  content: "";
}

.choice-card:hover,
.choice-card:focus-visible {
  outline: none;
  border-color: var(--acid);
  background: linear-gradient(160deg, rgba(42, 61, 34, 0.98), rgba(8, 12, 8, 0.98));
  transform: translateY(-7px);
}

.choice-card:disabled {
  border-color: #34372f;
  opacity: 0.48;
  cursor: not-allowed;
  filter: grayscale(0.7);
}

.choice-card:disabled:hover {
  background: linear-gradient(160deg, rgba(30, 40, 28, 0.97), rgba(7, 10, 7, 0.98));
  transform: none;
}

.choice-card .new-tag {
  position: absolute;
  top: 0;
  right: 0;
  padding: 5px 8px;
  background: var(--gold);
  color: #17130b;
  font: 800 8px "Cinzel", serif;
  letter-spacing: 0.14em;
}

.choice-icon {
  display: grid;
  width: 70px;
  height: 70px;
  margin-bottom: 23px;
  place-items: center;
  border: 1px solid #5f7950;
  color: var(--acid);
  font: 700 37px "Cinzel", serif;
}

.choice-card h3 {
  margin: 0 0 5px;
  font: 800 16px "Cinzel", serif;
}

.choice-card .stars {
  color: var(--gold);
  font: 700 13px "Cinzel", serif;
  letter-spacing: 0.08em;
}

.choice-card p {
  min-height: 58px;
  margin: 9px 0 0;
  color: #bdb6a3;
  font-size: 14px;
  line-height: 1.35;
}

.choice-card b {
  display: block;
  margin-top: 15px;
  color: var(--moss);
  font: 700 9px "Cinzel", serif;
  letter-spacing: 0.1em;
}

.gameover-screen .eyebrow {
  color: #d55860;
}

.final-stats {
  display: grid;
  grid-template-columns: repeat(4, 90px);
  margin: 32px 0;
}

.final-stats div {
  padding: 7px;
  border-right: 1px solid #595647;
}

.final-stats div:last-child {
  border: 0;
}

.final-stats span,
.final-stats strong {
  display: block;
}

.final-stats span {
  color: #888275;
  font-style: italic;
}

.final-stats strong {
  margin-top: 5px;
  font: 700 22px "Cinzel", serif;
}

.joystick {
  position: absolute;
  z-index: 12;
  bottom: 48px;
  left: 28px;
  display: none;
  width: 92px;
  height: 92px;
  border: 1px solid rgba(233, 223, 197, 0.3);
  border-radius: 50%;
  background: rgba(5, 8, 5, 0.38);
}

.joystick-knob {
  position: absolute;
  top: 28px;
  left: 28px;
  width: 36px;
  height: 36px;
  border: 1px solid #9abd78;
  border-radius: 50%;
  background: rgba(86, 139, 58, 0.75);
}

@keyframes turn {
  to { transform: rotate(360deg); }
}

@media (max-width: 680px) {
  .hud {
    top: 18px;
    grid-template-columns: 1fr 68px 45px 45px;
    gap: 7px;
  }

  .kills-block span,
  .coins-block span {
    font-size: 8px;
    letter-spacing: 0.08em;
  }

  .timer-block strong {
    font-size: 18px;
  }

  .choices {
    grid-template-columns: 1fr;
    max-width: 420px;
  }

  .bestiary-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
  }

  .collection-grid,
  .evolution-collection,
  .xp-collection {
    grid-template-columns: 1fr;
  }

  .collection-ledger {
    max-width: 420px;
  }

  .shop-heading {
    align-items: center;
  }

  .shop-wallet {
    min-width: 105px;
  }

  .character-shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shop-section-heading span {
    display: none;
  }

  .powerup-card {
    grid-template-columns: 52px 1fr;
  }

  .powerup-icon {
    width: 48px;
    height: 48px;
  }

  .powerup-action {
    grid-column: 1 / -1;
  }

  .beast-card {
    grid-template-columns: 64px 1fr;
  }

  .beast-portrait {
    width: 54px;
    height: 62px;
  }

  .choice-card {
    display: grid;
    grid-template-columns: 55px 1fr;
    column-gap: 14px;
    min-height: 0;
    padding: 13px;
  }

  .choice-icon {
    grid-row: 1 / 5;
    width: 55px;
    height: 55px;
    margin: 0;
  }

  .choice-card p {
    min-height: 0;
    margin: 7px 0;
  }

  .choice-card b {
    margin-top: 7px;
  }

  .level-heading span {
    margin: 9px 0 14px;
  }

  .joystick {
    display: block;
  }

  .controls {
    display: none;
  }
}

@media (max-height: 610px) {
  .moon-seal {
    display: none;
  }

  h1 {
    font-size: 52px;
  }

  .choice-card {
    min-height: 220px;
    padding-top: 15px;
  }

  .choice-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
