:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  background: #101927;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #101927;
  touch-action: none;
  user-select: none;
}

body {
  display: grid;
  place-items: center;
}

#gameShell {
  position: relative;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  background: #101927;
}

canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #101927;
  touch-action: none;
}

#hud {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  left: max(14px, env(safe-area-inset-left));
  right: max(14px, env(safe-area-inset-right));
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(155px, 260px) repeat(4, minmax(78px, auto));
  gap: 8px;
  align-items: center;
  color: #fff9dc;
  pointer-events: none;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
}

#hud > div {
  min-height: 44px;
  border: 1px solid rgba(246, 220, 117, 0.35);
  background: rgba(9, 15, 25, 0.74);
  border-radius: 8px;
  padding: 9px 12px;
  backdrop-filter: blur(8px);
}

#hud strong {
  display: block;
  font-size: 15px;
  letter-spacing: 0;
}

#levelName,
#scoreText {
  font-size: 13px;
}

#livesText,
#sprayText,
#rosaryText {
  font-size: 13px;
  text-align: center;
}

.status-chip {
  white-space: nowrap;
}

.meter {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 9px;
}

.meter span {
  font-size: 13px;
  align-self: center;
}

.meter::after {
  content: "";
  grid-column: 2;
  grid-row: 1;
  height: 12px;
  align-self: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.meter i {
  grid-column: 2;
  grid-row: 1;
  width: 0%;
  height: 12px;
  align-self: center;
  border-radius: 999px;
  background: linear-gradient(90deg, #f8dc71, #fff8c8);
  box-shadow: 0 0 16px rgba(248, 220, 113, 0.9);
  z-index: 1;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 10px;
  text-align: center;
  color: #fff9dc;
  background:
    radial-gradient(circle at 50% 42%, rgba(246, 220, 117, 0.22), transparent 32%),
    rgba(6, 10, 18, 0.72);
  padding: 28px;
  overflow: auto;
}

.overlay.hidden {
  display: none;
}

#titleScreen {
  place-content: start center;
  align-content: start;
  padding-top: max(36px, calc(env(safe-area-inset-top) + 22px));
  padding-bottom: max(34px, env(safe-area-inset-bottom));
}

#helpScreen {
  place-content: start center;
  align-content: start;
  padding-top: max(36px, calc(env(safe-area-inset-top) + 24px));
  background:
    linear-gradient(180deg, rgba(4, 8, 16, 0.24), rgba(4, 8, 16, 0.58)),
    url("./assets/help/crux-sacra-help-poster-v1.png") center / cover no-repeat;
}

#helpScreen h2 {
  display: inline-block;
  width: max-content;
  max-width: 92vw;
  margin-inline: auto;
  padding: 8px 22px;
  border: 1px solid rgba(255, 248, 211, 0.36);
  border-radius: 8px;
  background: rgba(7, 13, 23, 0.42);
  backdrop-filter: blur(5px);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.title-credits {
  max-width: 760px;
  margin: 4px auto 18px;
  color: rgba(255, 249, 220, 0.74);
  font-size: clamp(12px, 1.7vw, 15px);
}

.brand-lockup {
  width: min(220px, 42vw);
  margin: 0 auto 4px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 248, 211, 0.28);
  border-radius: 8px;
  background: rgba(4, 9, 18, 0.32);
  box-shadow: 0 0 22px rgba(246, 220, 117, 0.12);
  backdrop-filter: blur(5px);
}

.brand-lockup img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 78px;
  object-fit: contain;
}

.brand-lockup-small {
  width: min(150px, 32vw);
  margin-bottom: 0;
  padding: 4px 9px;
}

.brand-lockup-small img {
  max-height: 52px;
}

.title-actions {
  width: min(760px, calc(100% - 24px));
  display: grid;
  grid-template-columns: 1.35fr 0.8fr 1fr;
  gap: 10px;
  margin: 16px auto 0;
}

.secondary-action {
  background: rgba(9, 15, 25, 0.78);
  color: #fff8d3;
  border-color: rgba(255, 248, 211, 0.48);
}

.progress-status {
  min-height: 20px;
  margin: 8px 0 0;
  color: #bdefff;
  font-size: 13px;
  font-weight: 800;
}

#titleScreen:not(.hidden) ~ #hud,
#titleScreen:not(.hidden) ~ #mobileControls,
#introScreen:not(.hidden) ~ #hud,
#introScreen:not(.hidden) ~ #mobileControls,
#finalScreen:not(.hidden) ~ #hud,
#finalScreen:not(.hidden) ~ #mobileControls,
#helpScreen:not(.hidden) ~ #hud,
#helpScreen:not(.hidden) ~ #mobileControls,
#creditsScreen:not(.hidden) ~ #hud,
#creditsScreen:not(.hidden) ~ #mobileControls,
#endScreen:not(.hidden) ~ #hud,
#endScreen:not(.hidden) ~ #mobileControls {
  display: none;
}

.video-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  gap: 14px;
  padding: max(18px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  background: rgba(4, 9, 18, 0.92);
}

.video-overlay.hidden {
  display: none;
}

.credits-card {
  width: min(94vw, 880px);
  display: grid;
  gap: 10px;
  margin: 8px auto 6px;
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid rgba(246, 220, 117, 0.45);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 236, 160, 0.12), rgba(74, 128, 176, 0.08)),
    rgba(7, 13, 23, 0.78);
  box-shadow: 0 0 34px rgba(0, 0, 0, 0.32);
  text-align: left;
}

.credits-card p {
  display: grid;
  grid-template-columns: minmax(150px, 0.42fr) 1fr;
  gap: 14px;
  align-items: start;
  margin: 0;
  line-height: 1.25;
}

.credits-card strong {
  color: #ffe476;
}

.credits-card span {
  color: #fff9dc;
}

.help-card {
  width: min(94vw, 1040px);
  max-height: min(72dvh, 650px);
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 8px auto 6px;
  padding: clamp(14px, 2.5vw, 22px);
  border: 1px solid rgba(246, 220, 117, 0.30);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 236, 160, 0.07), rgba(74, 128, 176, 0.05)),
    rgba(7, 13, 23, 0.34);
  box-shadow: 0 0 34px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(3px);
  text-align: left;
}

.help-card section {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(255, 249, 220, 0.16);
  border-radius: 8px;
  background: rgba(4, 9, 18, 0.42);
  backdrop-filter: blur(2px);
}

.help-card h3 {
  margin: 0 0 8px;
  color: #ffe476;
  font-size: clamp(15px, 2vw, 19px);
}

.help-card p {
  margin: 0 0 8px;
  color: rgba(255, 249, 220, 0.88);
  font-size: clamp(12px, 1.65vw, 15px);
  line-height: 1.34;
}

.help-card p:last-child {
  margin-bottom: 0;
}

.control-list {
  display: grid;
  gap: 7px;
  margin: 0;
}

.control-list div {
  display: grid;
  grid-template-columns: minmax(110px, 0.46fr) 1fr;
  gap: 10px;
  align-items: center;
  padding: 7px 8px;
  border-radius: 7px;
  background: rgba(255, 248, 211, 0.07);
}

.control-list dt {
  margin: 0;
  color: #9ee7ff;
  font-weight: 900;
}

.control-list dd {
  margin: 0;
  color: rgba(255, 249, 220, 0.88);
  line-height: 1.2;
}

.world-help-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
  color: #fff9dc;
  font-size: clamp(12px, 1.65vw, 15px);
  line-height: 1.25;
}

.world-help-list strong,
.help-card strong {
  color: #ffe476;
}

.video-frame {
  position: relative;
  width: min(100%, 1180px);
  max-height: 74dvh;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(246, 220, 117, 0.45);
  border-radius: 8px;
  overflow: hidden;
  background: #050a12;
  box-shadow: 0 0 36px rgba(0, 0, 0, 0.45);
}

#introVideo,
#finalVideo {
  width: min(100%, 1180px);
  max-height: 74dvh;
  aspect-ratio: 16 / 9;
  background: #050a12;
  border: 1px solid rgba(246, 220, 117, 0.45);
  border-radius: 8px;
  box-shadow: 0 0 36px rgba(0, 0, 0, 0.45);
}

.video-frame #introVideo,
.video-frame #finalVideo {
  width: 100%;
  height: 100%;
  max-height: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  object-fit: cover;
}

.intro-cast {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 7%;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: end;
  gap: clamp(8px, 2.1vw, 22px);
  pointer-events: none;
}

.intro-cast.hidden {
  display: none;
}

.intro-cast::before {
  content: "";
  position: absolute;
  left: -5%;
  right: -5%;
  bottom: -12%;
  height: 46%;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(4, 8, 16, 0.62));
}

.intro-cast-card {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 68px;
  max-width: 128px;
  color: #fff9dc;
  font-size: clamp(10px, 1.6vw, 14px);
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
}

.intro-cast-card img {
  width: clamp(56px, 8.2vw, 98px);
  height: clamp(74px, 12.5vw, 138px);
  object-fit: contain;
  filter: drop-shadow(0 9px 12px rgba(0, 0, 0, 0.72));
}

.intro-cast-card.villain img {
  width: clamp(76px, 11.5vw, 138px);
  height: clamp(98px, 16vw, 178px);
  filter: drop-shadow(0 0 18px rgba(62, 207, 255, 0.85)) drop-shadow(0 10px 14px rgba(0, 0, 0, 0.78));
}




.video-caption {
  max-width: min(92vw, 980px);
  margin: 0;
  padding: 10px 16px;
  color: #fff6cf;
  font-size: clamp(0.9rem, 2.2vw, 1.1rem);
  line-height: 1.35;
  text-align: center;
  background: rgba(8, 13, 24, 0.72);
  border: 1px solid rgba(246, 220, 117, 0.32);
  border-radius: 8px;
}

.title-mark {
  width: 96px;
  height: 96px;
  margin: 0 auto 8px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f6dc75;
  color: #101927;
  font-size: 58px;
  font-weight: 700;
  box-shadow: 0 0 42px rgba(246, 220, 117, 0.65);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(42px, 10vw, 86px);
  line-height: 0.95;
}

h2 {
  font-size: clamp(30px, 7vw, 58px);
}

.overlay p {
  font-size: clamp(16px, 3.6vw, 24px);
}

#characterSelect {
  width: min(960px, 92vw);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 10px auto 4px;
}

#difficultySelect {
  width: min(640px, 92vw);
  margin: 10px auto 0;
}

#worldSelect {
  width: min(1260px, 92vw);
  margin: 10px auto 0;
}

#worldSelect .difficulty-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.select-panel {
  border: 1px solid rgba(246, 220, 117, 0.25);
  background: rgba(9, 15, 25, 0.52);
  border-radius: 8px;
  padding: 10px;
}

.select-panel h2 {
  margin: 0 0 8px;
  font-size: 15px;
  color: #fff8d3;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.difficulty-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

button {
  appearance: none;
  border: 1px solid rgba(255, 249, 220, 0.45);
  background: #f6dc75;
  color: #101927;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 8px;
  font: 700 16px/1 Arial, Helvetica, sans-serif;
  cursor: pointer;
}

button:focus-visible {
  outline: 3px solid #9ee7ff;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(158, 231, 255, 0.22), 0 0 24px rgba(246, 220, 117, 0.4);
}

.character-choice {
  min-height: 54px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(9, 15, 25, 0.76);
  color: #fff9dc;
  font-size: 13px;
  line-height: 1.1;
  text-align: left;
  white-space: normal;
}

.character-choice[hidden] {
  display: none;
}

.difficulty-choice,
.world-choice {
  min-height: 44px;
  padding: 0 12px;
  background: rgba(9, 15, 25, 0.76);
  color: #fff9dc;
  font-size: 14px;
}

.difficulty-choice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
}

.difficulty-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 249, 220, 0.16);
  font-size: 17px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 249, 220, 0.2);
}

.world-choice {
  min-height: 116px;
  padding: 7px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 6px;
  overflow: hidden;
}

.world-choice img {
  width: 100%;
  height: 74px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255, 249, 220, 0.28);
}

.world-choice span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.world-choice.final-world {
  grid-column: 1 / -1;
  min-height: 156px;
}

.world-choice.final-world img {
  height: 104px;
}

.world-choice.bonus-world {
  grid-column: 1 / -1;
  min-height: 168px;
  border-color: rgba(180, 220, 255, 0.38);
}

.world-choice.bonus-world img {
  height: 116px;
  object-fit: cover;
  object-position: center;
}

.choice-portrait {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  object-fit: contain;
  object-position: center bottom;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(255, 248, 211, 0.3), rgba(255, 248, 211, 0.08) 62%, rgba(255, 248, 211, 0));
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

.choice-name {
  flex: 1;
  min-width: 0;
}

.character-choice.selected,
.difficulty-choice.selected,
.world-choice.selected {
  background: #f6dc75;
  color: #101927;
  border-color: #fff8d3;
  box-shadow: 0 0 18px rgba(246, 220, 117, 0.5);
}

.character-choice.locked,
.character-choice:disabled,
.world-choice.locked,
.world-choice:disabled {
  cursor: not-allowed;
  opacity: 0.38;
  filter: grayscale(1);
  color: rgba(255, 249, 220, 0.72);
  background: rgba(70, 76, 86, 0.28);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.character-choice.locked .choice-name::after {
  content: " LOCKED";
  display: block;
  margin-top: 3px;
  font-size: 9px;
  letter-spacing: 0;
  color: rgba(255, 249, 220, 0.78);
}

.world-choice.locked span::after {
  content: " · LOCKED";
  font-size: 10px;
  letter-spacing: 0;
  color: rgba(255, 249, 220, 0.78);
}

.world-choice.final-world.unlocked {
  border-color: rgba(255, 244, 168, 0.82);
  box-shadow: 0 0 24px rgba(255, 244, 168, 0.34);
}

.world-choice.bonus-world.unlocked {
  border-color: rgba(180, 220, 255, 0.86);
  box-shadow: 0 0 24px rgba(180, 220, 255, 0.32);
}

.final-cast.edition-finale {
  left: 2.5%;
  right: 2.5%;
  bottom: 4%;
  gap: clamp(5px, 1.1vw, 14px);
  align-items: end;
}

.final-cast.edition-finale .intro-cast-card {
  min-width: 50px;
  transform: scale(0.78);
  opacity: 0.82;
}

.final-cast.edition-finale .intro-cast-card.featured {
  transform: scale(1.16);
  opacity: 1;
  z-index: 3;
}

.final-cast.edition-finale .intro-cast-card.jesus-card {
  transform: scale(1.3);
  opacity: 1;
  z-index: 4;
}

#mobileControls {
  position: absolute;
  inset: auto 0 max(18px, env(safe-area-inset-bottom)) 0;
  display: none;
  justify-content: space-between;
  align-items: end;
  padding: 0 max(20px, env(safe-area-inset-left)) 0 max(20px, env(safe-area-inset-right));
  pointer-events: none;
}

#stick,
#prayButton,
#sprayButton,
#rosaryButton,
#pauseButton {
  pointer-events: auto;
  touch-action: none;
}

#stick {
  width: 124px;
  height: 124px;
  border-radius: 50%;
  border: 1px solid rgba(255, 249, 220, 0.35);
  background: rgba(9, 15, 25, 0.48);
  position: relative;
  backdrop-filter: blur(8px);
}

#stick i {
  position: absolute;
  width: 52px;
  height: 52px;
  left: 35px;
  top: 35px;
  border-radius: 50%;
  background: rgba(246, 220, 117, 0.92);
  box-shadow: 0 0 18px rgba(246, 220, 117, 0.55);
}

.action-buttons {
  display: flex;
  gap: 10px;
  align-items: end;
  pointer-events: auto;
}

#prayButton,
#sprayButton,
#rosaryButton,
#pauseButton {
  width: 86px;
  height: 86px;
  min-height: 86px;
  border-radius: 50%;
  font-size: 42px;
  padding: 0;
  box-shadow: 0 0 28px rgba(246, 220, 117, 0.45);
}

#sprayButton {
  width: 72px;
  height: 72px;
  min-height: 72px;
  font-size: 34px;
  background: #9ee7ff;
}

#rosaryButton {
  width: 72px;
  height: 72px;
  min-height: 72px;
  font-size: 34px;
  background: #fff4a8;
}

#pauseButton {
  width: 62px;
  height: 62px;
  min-height: 62px;
  font-size: 30px;
  background: #fff8d3;
}

@media (hover: none), (max-width: 820px) {
  .overlay {
    place-content: start center;
    gap: 7px;
    padding: max(38px, calc(env(safe-area-inset-top) + 18px)) 10px max(12px, env(safe-area-inset-bottom));
  }

  .title-mark {
    width: 58px;
    height: 58px;
    margin-bottom: 2px;
    font-size: 36px;
  }

  h1 {
    font-size: clamp(34px, 11vw, 52px);
  }

  .brand-lockup {
    width: min(150px, 34vw);
    padding: 4px 8px;
  }

  .brand-lockup img {
    max-height: 48px;
  }

  .overlay p {
    font-size: 13px;
  }

  #difficultySelect,
  #worldSelect,
  #characterSelect {
    width: min(100%, 680px);
  }

  #worldSelect .difficulty-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .select-panel {
    padding: 7px;
  }

  .select-panel h2 {
    margin-bottom: 5px;
    font-size: 13px;
  }

  #characterSelect {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .difficulty-grid {
    gap: 6px;
  }

  .character-choice {
    min-height: 44px;
    padding: 4px 6px;
    font-size: 12px;
  }

  .difficulty-choice {
    min-height: 38px;
    padding: 0 6px;
    font-size: 12px;
  }

  .choice-portrait {
    width: 31px;
    height: 31px;
    flex-basis: 31px;
  }

  #mobileControls {
    display: flex;
    inset: auto 0 max(7px, env(safe-area-inset-bottom)) 0;
    padding-inline: max(10px, env(safe-area-inset-left)) max(10px, env(safe-area-inset-right));
    opacity: 0.82;
  }

  #hud {
    grid-template-columns: minmax(112px, 1fr) repeat(2, auto);
    gap: 5px;
    top: max(8px, env(safe-area-inset-top));
    left: max(8px, env(safe-area-inset-left));
    right: max(8px, env(safe-area-inset-right));
  }

  #hud > div {
    min-height: 30px;
    padding: 5px 7px;
  }

  #hud .meter {
    grid-column: 1 / -1;
    order: 3;
  }

  #hud .status-chip {
    padding-inline: 8px;
  }

  #hud strong {
    font-size: 12px;
  }

  #levelName,
  #scoreText,
  #livesText,
  #sprayText,
  #rosaryText,
  .meter span {
    font-size: 11px;
  }

  #stick {
    width: 96px;
    height: 96px;
  }

  #stick i {
    left: 22px;
    top: 22px;
  }

  .action-buttons {
    gap: 8px;
  }

  #prayButton {
    width: 62px;
    height: 62px;
    min-height: 62px;
    font-size: 32px;
  }

  #sprayButton {
    width: 54px;
    height: 54px;
    min-height: 54px;
    font-size: 27px;
  }

  #rosaryButton {
    width: 54px;
    height: 54px;
    min-height: 54px;
    font-size: 27px;
  }

  #pauseButton {
    width: 48px;
    height: 48px;
    min-height: 48px;
    font-size: 23px;
  }
}

@media (orientation: portrait) {
  canvas {
    object-fit: contain;
  }

  #hud {
    grid-template-columns: 1fr auto;
  }
}

@media (hover: none) and (max-height: 500px) {
  .overlay {
    padding-top: max(5px, env(safe-area-inset-top));
    gap: 4px;
  }

  .title-mark,
  .overlay p {
    display: none;
  }

  .brand-lockup {
    width: min(110px, 24vw);
    padding: 2px 6px;
  }

  .brand-lockup img {
    max-height: 32px;
  }

  h1 {
    font-size: 30px;
  }

  #difficultySelect {
    margin-top: 2px;
  }

  #characterSelect {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 4px;
  }

  .select-panel {
    padding: 5px;
  }

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

  .character-choice {
    min-height: 34px;
    gap: 4px;
    font-size: 10px;
  }

  .difficulty-choice {
    min-height: 32px;
    font-size: 11px;
  }

  .title-actions {
    grid-template-columns: 1fr;
    gap: 7px;
    margin-top: 10px;
  }

  .choice-portrait {
    width: 25px;
    height: 25px;
    flex-basis: 25px;
  }

  #introButton,
  #startButton,
  #helpButton,
  #resetProgressButton,
  #againButton,
  #skipIntroButton,
  #skipFinalButton,
  #creditsContinueButton,
  #helpCloseButton {
    min-height: 34px;
    padding-inline: 14px;
    font-size: 12px;
  }

  .help-card {
    grid-template-columns: 1fr;
    max-height: 74dvh;
    gap: 8px;
    padding: 10px;
  }

  .help-card section {
    padding: 9px;
  }

  .control-list div {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 6px 7px;
  }

  .credits-card {
    gap: 7px;
    padding: 12px;
    font-size: 12px;
  }

  .credits-card p {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  #hud {
    grid-template-columns: minmax(96px, 1fr) repeat(4, auto);
    gap: 4px;
    top: max(5px, env(safe-area-inset-top));
    left: max(5px, env(safe-area-inset-left));
    right: max(5px, env(safe-area-inset-right));
  }

  #hud > div {
    min-height: 25px;
    padding: 3px 5px;
    border-radius: 6px;
  }

  #hud .meter {
    grid-column: auto;
    order: 0;
    min-width: 92px;
  }

  #hud strong {
    font-size: 10px;
  }

  #levelName {
    display: none;
  }

  #scoreText,
  #livesText,
  #sprayText,
  #rosaryText,
  .meter span {
    font-size: 10px;
  }

  .meter {
    grid-template-columns: 26px 1fr;
    gap: 4px;
  }

  .meter::after,
  .meter i {
    height: 8px;
  }

  #mobileControls {
    bottom: max(5px, env(safe-area-inset-bottom));
    padding-inline: max(7px, env(safe-area-inset-left)) max(7px, env(safe-area-inset-right));
    opacity: 0.72;
  }

  #stick {
    width: 72px;
    height: 72px;
  }

  #stick i {
    width: 34px;
    height: 34px;
    left: 18px;
    top: 18px;
  }

  .action-buttons {
    gap: 5px;
  }

  #prayButton,
  #sprayButton,
  #rosaryButton {
    width: 42px;
    height: 42px;
    min-height: 42px;
    font-size: 21px;
  }

  #pauseButton {
    width: 36px;
    height: 36px;
    min-height: 36px;
    font-size: 18px;
  }
}
