:root {
  color-scheme: light;
  --ink: #20232a;
  --muted: #6b6472;
  --paper: #fffaf5;
  --panel: #ffffff;
  --line: rgba(32, 35, 42, 0.16);
  --mint: #47c9a2;
  --pink: #ff6f9f;
  --sun: #ffd166;
  --sky: #79c7ff;
  --danger: #ef476f;
  --shadow: 0 16px 38px rgba(51, 39, 66, 0.16);
  --shell-pad: 12px;
  --game-gap: 10px;
  --hud-fit-height: 74px;
  --mobile-controls-height: 0px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  touch-action: manipulation;
  overscroll-behavior: none;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Noto Sans JP", system-ui, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(71, 201, 162, 0.18), transparent 34%),
    linear-gradient(225deg, rgba(255, 111, 159, 0.18), transparent 36%),
    #fff4dc;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: var(--shell-pad);
}

.game-card {
  position: relative;
  display: grid;
  gap: var(--game-gap);
}

.hud {
  position: relative;
  z-index: 45;
  display: grid;
  grid-template-columns: minmax(160px, 1.25fr) 1.35fr repeat(3, minmax(86px, 0.75fr)) auto auto;
  gap: 8px;
  align-items: stretch;
}

.brand,
.hud-stat,
.hud-audio,
.quit-button,
.registration {
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 246, 236, 0.86));
  box-shadow: 0 10px 24px rgba(51, 39, 66, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.brand {
  min-height: 58px;
  display: grid;
  place-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  overflow: hidden;
}

.brand-kicker,
.panel-kicker,
.hud-stat span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand strong {
  width: 100%;
  font-size: clamp(24px, 2.2vw, 34px);
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0;
}

.hud-stat {
  min-height: 64px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  padding: 7px 10px;
  border-radius: 8px;
}

.hud-stat strong {
  font-size: 32px;
  line-height: 1;
  color: #20232a;
  text-shadow: 0 2px 0 #fff, 0 5px 12px rgba(91, 61, 102, 0.2);
  font-weight: 1000;
}

.hud-score strong {
  font-size: 42px;
  color: #181922;
}

.hud-score {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 225, 132, 0.38), rgba(255, 225, 132, 0) 56%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 246, 236, 0.86));
  border-color: rgba(255, 209, 102, 0.72);
}

.hud-audio {
  min-height: 64px;
  position: relative;
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(2, 48px);
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 8px;
}

.audio-toggle {
  width: 48px;
  height: 48px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 1px;
  place-items: center;
  border: 1px solid rgba(32, 35, 42, 0.18);
  border-radius: 8px;
  color: #2c2d31;
  background: #fff;
}

.audio-label {
  font-size: 9px;
  font-weight: 1000;
  line-height: 1;
}

.audio-toggle[aria-pressed="false"] {
  color: #9d98a4;
  background: #f2f0f4;
}

.mobile-audio-toggle,
.audio-menu {
  display: none;
}

.audio-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 200;
  min-width: 156px;
  padding: 7px;
  border: 1px solid rgba(32, 35, 42, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 32px rgba(51, 39, 66, 0.24);
  backdrop-filter: blur(10px);
}

.audio-menu.is-open {
  display: grid;
  gap: 5px;
}

.audio-menu-button {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(32, 35, 42, 0.14);
  border-radius: 8px;
  padding: 7px 9px;
  background: #eef7ff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.audio-menu-button[aria-pressed="false"] {
  background: #f2f0f4;
  color: #8d8794;
}

.audio-menu-button strong {
  min-width: 34px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(32, 35, 42, 0.92);
  color: #fff;
  font-size: 11px;
  text-align: center;
}

.audio-menu-button[aria-pressed="false"] strong {
  background: rgba(141, 135, 148, 0.34);
  color: #5d5863;
}

.audio-menu-button span,
.audio-menu-button strong {
  pointer-events: none;
}

.audio-icon svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.scroll-cue {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: clamp(10px, 2.5vw, 24px);
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(32, 35, 42, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(51, 39, 66, 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 280ms ease, transform 280ms ease;
  animation: cueBounce 1.3s ease-in-out infinite;
}

.scroll-cue.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.scroll-cue svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

@keyframes cueBounce {
  0%,
  100% {
    margin-bottom: 0;
  }
  50% {
    margin-bottom: 8px;
  }
}

.quit-button {
  display: none;
  min-width: 72px;
  min-height: 64px;
  border-radius: 8px;
  font-weight: 900;
  color: var(--ink);
}

body.is-playing .quit-button {
  display: block;
}

body.is-playing,
body.is-playing * {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

body.is-playing {
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
}

.stage-wrap {
  position: relative;
  overflow: hidden;
  width: min(100%, 1390px, calc((100svh - var(--shell-pad) * 2 - var(--hud-fit-height) - var(--game-gap)) * 16 / 9));
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  max-height: calc(100svh - var(--shell-pad) * 2 - var(--hud-fit-height) - var(--game-gap));
  border: 2px solid rgba(32, 35, 42, 0.16);
  border-radius: 8px;
  background: #91ddff url("assets/generated/yuru-catch-bg.png") center / cover no-repeat;
  box-shadow: var(--shadow);
}

#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.mobile-controls {
  display: none;
  position: relative;
  z-index: 70;
}

.start-overlay,
.howto-overlay,
.result-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(255, 250, 245, 0.56), rgba(255, 250, 245, 0.2));
}

.start-overlay.is-hidden,
.howto-overlay.is-hidden,
.result-overlay.is-hidden {
  display: none;
}

.howto-overlay {
  z-index: 22;
  background: linear-gradient(180deg, rgba(255, 250, 245, 0.9), rgba(255, 236, 248, 0.74));
}

.howto-card {
  width: min(600px, 92%);
  display: grid;
  gap: 12px;
  padding: 22px 24px;
  border: 2px solid rgba(255, 209, 102, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 46px rgba(51, 39, 66, 0.18), inset 0 1px 0 #fff;
}

.howto-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.howto-card li {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255, 209, 102, 0.28), rgba(142, 246, 255, 0.2));
  color: var(--ink);
  font-weight: 900;
  line-height: 1.25;
}

.howto-start-button {
  justify-self: center;
  margin-top: 4px;
}

.logo {
  max-width: min(300px, 42vw);
  max-height: 82px;
  object-fit: contain;
}

.start-copy {
  text-align: center;
}

.start-copy h1 {
  margin: 0;
  font-size: 50px;
  line-height: 1;
}

.start-copy p {
  margin: 0 0 4px;
}

.character-grid {
  width: min(900px, 96%);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.character-card {
  display: grid;
  gap: 5px;
  place-items: center;
  min-height: 118px;
  padding: 8px;
  border: 2px solid rgba(32, 35, 42, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
}

.character-card.is-selected {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(255, 111, 159, 0.2);
}

.character-card img {
  width: 78px;
  height: 72px;
  object-fit: contain;
}

.character-card strong {
  font-size: 13px;
  line-height: 1.1;
}

.primary-button,
.secondary-button,
.entry-button,
.admin-button,
.admin-action-button {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: 0 10px 22px rgba(51, 39, 66, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  font-weight: 900;
}

.primary-button {
  min-width: 190px;
  border-color: rgba(255, 111, 159, 0.45);
  background: linear-gradient(100deg, #ff6f9f 0%, #ffd166 52%, #8ef6ff 100%);
  color: #20232a;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
  box-shadow: 0 14px 30px rgba(255, 111, 159, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

.secondary-button {
  min-width: 140px;
  border-color: rgba(32, 35, 42, 0.22);
  color: var(--ink);
}

.result-card {
  width: min(500px, 92%);
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  text-align: center;
}

.result-character {
  width: min(118px, 28vw);
  height: min(118px, 28vw);
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(51, 39, 66, 0.18));
}

.result-card h2 {
  margin: 0;
  font-size: 58px;
  line-height: 1;
}

.result-card p {
  margin: 0;
}

.result-rank {
  padding: 5px 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 209, 102, 0.32), rgba(142, 246, 255, 0.24));
  color: #5f5870;
  font-size: 13px;
  font-weight: 1000;
}

.result-profile {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.hp-hearts {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 104px;
}

.hp-heart {
  width: 25px;
  height: 25px;
  display: block;
  filter: drop-shadow(0 2px 0 #fff) drop-shadow(0 4px 6px rgba(239, 71, 111, 0.25));
}

.hp-compact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
}

.hp-count {
  color: #20232a;
  font-weight: 1000;
  line-height: 1;
  text-shadow: 0 2px 0 #fff, 0 4px 10px rgba(91, 61, 102, 0.18);
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.result-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.below-panels {
  width: min(1100px, 100%);
  margin: 0 auto;
}

.registration {
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: 8px;
}

.registration-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.registration-title {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.registration form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: stretch;
}

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
}

input[readonly] {
  color: #6a6570;
  background: #f4f2f5;
}

.entry-button {
  width: 100%;
  min-height: 48px;
  border-color: rgba(255, 111, 159, 0.34);
  background: linear-gradient(135deg, #ffb7d5 0%, #ffdca8 48%, #9feeff 100%);
  color: #20232a;
  box-shadow: 0 10px 20px rgba(255, 111, 159, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.entry-status,
.admin-status,
.fineprint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.entry-status {
  grid-column: 1 / -1;
  min-height: 1rem;
}

.admin-button {
  min-height: 32px;
  min-width: 76px;
  border-radius: 0;
  background: transparent;
  color: #111;
}

.admin-button.is-hidden,
.admin-panel.is-hidden,
.admin-login.is-hidden,
.admin-actions.is-hidden {
  display: none;
}

.admin-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-login,
.admin-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.admin-actions {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.admin-action-button.is-holding {
  background: #111;
  color: #fff;
}

body.is-playing .below-panels {
  display: none;
}

@media (max-width: 900px) {
  :root {
    --hud-fit-height: 94px;
    --mobile-controls-height: 78px;
  }

  .hud {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
  }

  .brand {
    grid-column: 1 / -1;
    min-height: 34px;
  }

  .hud-score {
    grid-column: span 2;
  }

  .hud-stat,
  .brand,
  .hud-audio,
  .quit-button {
    min-height: 44px;
    padding: 4px;
  }

  .hud-stat strong,
  .brand strong {
    font-size: 20px;
  }

  .brand strong {
    font-size: 22px;
  }

  .hp-hearts {
    min-width: 78px;
    gap: 2px;
  }

  .hp-heart {
    width: 20px;
    height: 20px;
  }

  .hp-heart-single {
    width: 22px;
    height: 22px;
  }

  .hp-count {
    font-size: 23px;
  }

  .hud-score strong {
    font-size: 28px;
  }

  .hud-audio {
    grid-template-columns: 1fr;
  }

  .audio-menu {
    right: -4px;
    top: calc(100% + 7px);
  }

  #bgmToggle,
  #sfxToggle {
    display: none;
  }

  .mobile-audio-toggle {
    display: grid;
  }

  .audio-toggle {
    width: 100%;
    height: 100%;
    min-height: 34px;
  }

  .audio-label {
    display: none;
  }

  .quit-button {
    min-width: 0;
    font-size: 13px;
  }

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

  .character-card {
    min-height: 76px;
    padding: 5px;
  }

  .character-card img {
    width: 48px;
    height: 42px;
  }

  .start-copy h1 {
    font-size: 34px;
  }

  .registration form {
    grid-template-columns: 1fr;
  }

  .entry-status {
    grid-column: auto;
  }

  body:not(.is-playing) .stage-wrap {
    aspect-ratio: auto;
    height: min(560px, calc(100svh - var(--shell-pad) * 2 - var(--hud-fit-height) - var(--game-gap)));
    min-height: 430px;
  }

  body.is-playing .stage-wrap {
    aspect-ratio: 16 / 9;
    min-height: 0;
    width: min(100%, 1390px, calc((100svh - var(--shell-pad) * 2 - var(--hud-fit-height) - var(--game-gap) * 2 - var(--mobile-controls-height)) * 16 / 9));
    max-height: calc(100svh - var(--shell-pad) * 2 - var(--hud-fit-height) - var(--game-gap) * 2 - var(--mobile-controls-height));
  }

  .result-overlay {
    place-items: start center;
    align-content: start;
    overflow-y: auto;
    padding: 10px 8px;
  }

  .result-card {
    width: min(420px, 92%);
    gap: 6px;
    padding: 10px;
  }

  .result-character {
    width: 86px;
    height: 86px;
  }

  .result-card h2 {
    font-size: 48px;
  }

  .result-card p,
  .result-profile {
    font-size: 13px;
  }

  .result-profile {
    gap: 2px;
    padding: 7px;
  }

  .howto-overlay {
    place-items: start center;
    align-content: start;
    overflow-y: auto;
    padding: 8px;
  }

  .howto-card {
    width: min(420px, 92%);
    max-height: calc(100% - 16px);
    overflow-y: auto;
    gap: 7px;
    padding: 12px;
  }

  .howto-card ul {
    gap: 6px;
  }

  .howto-card li {
    min-height: 0;
    padding: 6px 9px;
    font-size: 14px;
    line-height: 1.22;
  }

  .howto-start-button {
    position: sticky;
    bottom: 0;
    z-index: 2;
    min-height: 40px;
    margin-top: 2px;
    box-shadow: 0 -8px 18px rgba(255, 255, 255, 0.78), 0 8px 18px rgba(51, 39, 66, 0.16);
  }

  .result-actions {
    width: min(340px, 100%);
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .result-actions .primary-button,
  .result-actions .secondary-button {
    width: 100%;
    min-height: 42px;
  }

  .result-actions .primary-button {
    min-height: 58px;
    font-size: 18px;
  }

  body.is-playing .mobile-controls {
    width: min(100%, 720px);
    min-height: var(--mobile-controls-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 auto;
    padding: 6px 12px 10px;
    touch-action: none;
    overscroll-behavior: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
  }

  .move-pad {
    display: flex;
    gap: 10px;
  }

  .control-button {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 2px solid rgba(190, 198, 208, 0.95);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(226, 232, 240, 0.88));
    color: var(--ink);
    box-shadow: 0 8px 18px rgba(51, 39, 66, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.95);
    appearance: none;
    -webkit-appearance: none;
    font-weight: 1000;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
  }

  .control-button:active,
  .control-button.is-pressed {
    transform: translateY(2px) scale(0.98);
    background: linear-gradient(180deg, rgba(236, 240, 245, 0.96), rgba(207, 216, 226, 0.92));
    box-shadow: 0 4px 10px rgba(51, 39, 66, 0.1), inset 0 2px 8px rgba(108, 120, 135, 0.22);
  }

  .move-button {
    flex: 0 0 auto;
  }

  .jump-button {
    width: 86px;
    height: 86px;
    border-color: rgba(178, 186, 198, 0.98);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(224, 230, 238, 0.9));
    font-size: 14px;
    letter-spacing: 0.02em;
  }

  .control-icon,
  .control-icon svg {
    width: 30px;
    height: 30px;
    display: block;
    pointer-events: none;
  }

  .control-icon svg {
    fill: currentColor;
  }

  .jump-icon,
  .jump-icon svg {
    width: 34px;
    height: 34px;
  }
}

@media (max-width: 560px) {
  :root {
    --shell-pad: 6px;
    --game-gap: 6px;
    --hud-fit-height: 88px;
    --mobile-controls-height: 76px;
  }

  .shell {
    padding: var(--shell-pad);
  }

  .hud {
    gap: 4px;
  }

  .panel-kicker,
  .hud-stat span {
    font-size: 9px;
  }

  .hud-stat strong,
  .brand strong {
    font-size: 17px;
  }

  .brand strong {
    font-size: 20px;
  }

  .hud-score strong {
    font-size: 24px;
  }

  .hud-stat,
  .brand,
  .hud-audio,
  .quit-button {
    min-height: 40px;
    padding: 3px;
  }

  .brand {
    min-height: 32px;
  }

  .audio-icon svg {
    width: 19px;
    height: 19px;
  }

  .quit-button {
    font-size: 12px;
  }

  .stage-wrap {
    border-radius: 6px;
  }

  .start-overlay {
    gap: 8px;
    padding: 8px;
  }

  body:not(.is-playing) .stage-wrap {
    height: min(520px, calc(100svh - var(--shell-pad) * 2 - var(--hud-fit-height) - var(--game-gap)));
    min-height: 390px;
  }

  .logo {
    max-height: 44px;
  }

  .character-grid {
    width: min(320px, 94%);
    gap: 5px;
  }

  .character-card {
    min-height: 70px;
    padding: 5px;
  }

  .character-card img {
    width: 40px;
    height: 36px;
  }

  .character-card strong {
    font-size: 11px;
  }

  .primary-button,
  .secondary-button {
    min-height: 36px;
  }

  .result-overlay {
    padding: 8px 6px;
  }

  .result-card {
    width: min(360px, 92%);
    gap: 5px;
    padding: 8px;
  }

  .result-character {
    width: 72px;
    height: 72px;
  }

  .result-card h2 {
    font-size: 42px;
  }

  .result-card p,
  .result-profile {
    font-size: 12px;
  }

  .howto-overlay {
    padding: 6px;
  }

  .howto-card {
    width: min(360px, 88%);
    max-height: calc(100% - 12px);
    gap: 5px;
    padding: 9px;
  }

  .howto-card ul {
    gap: 5px;
  }

  .howto-card li {
    padding: 5px 8px;
    font-size: 13px;
  }

  .howto-start-button {
    min-height: 38px;
    font-size: 14px;
  }

  .result-actions .primary-button,
  .result-actions .secondary-button {
    min-height: 40px;
  }

  .result-actions .primary-button {
    min-height: 54px;
    font-size: 17px;
  }

  .hp-hearts {
    min-width: 0;
    gap: 1px;
  }

  .hp-heart {
    width: 16px;
    height: 16px;
  }

  .hp-heart-single {
    width: 18px;
    height: 18px;
  }

  .hp-count {
    font-size: 18px;
  }
}

@media (max-width: 900px) and (orientation: landscape) {
  :root {
    --mobile-controls-height: 0px;
  }

  body.is-playing .stage-wrap {
    width: min(100%, 1390px, calc((100svh - var(--shell-pad) * 2 - var(--hud-fit-height) - var(--game-gap)) * 16 / 9));
    max-height: calc(100svh - var(--shell-pad) * 2 - var(--hud-fit-height) - var(--game-gap));
  }

  body.is-playing .mobile-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8px;
    z-index: 35;
    width: 100%;
    min-height: 0;
    padding: 0 9%;
    pointer-events: none;
  }

  .move-pad {
    gap: 8px;
    pointer-events: auto;
  }

  .control-button {
    width: 52px;
    height: 52px;
    pointer-events: auto;
    opacity: 0.78;
  }

  .move-button {
    width: 52px;
  }

  .jump-button {
    width: 64px;
    height: 64px;
    font-size: 11px;
  }

  .control-icon,
  .control-icon svg {
    width: 24px;
    height: 24px;
  }
}
