:root {
  color-scheme: dark;
  --ink: #f6f1e8;
  --muted: #b9c2ca;
  --panel: rgba(13, 18, 24, 0.78);
  --line: rgba(255, 255, 255, 0.16);
  --accent: #f4c04f;
  --danger: #ff6574;
  --game-width: 960px;
  --game-height: 540px;
  --frame-scale: 1;
}

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

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: #090d12;
  color: var(--ink);
  font-family: "Segoe UI", "Yu Gothic UI", system-ui, sans-serif;
}

button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:active {
  transform: translateY(1px);
}

.screen {
  position: fixed;
  inset: 0;
  padding: 24px;
  overflow: auto;
}

#stageScreen,
#dexScreen {
  background:
    linear-gradient(180deg, rgba(5,8,12,0.68), rgba(5,8,12,0.92)),
    url("assets/images/title-background-v2.png") center / cover no-repeat;
}

.hidden {
  display: none !important;
}

.mobile-blocked-screen {
  display: none;
}

html.smartphone-blocked body {
  overflow: hidden;
}

html.smartphone-blocked #weaponCursor,
html.smartphone-blocked .screen:not(#mobileBlockedScreen) {
  display: none !important;
}

html.smartphone-blocked .mobile-blocked-screen {
  display: grid !important;
  place-items: center;
  overflow: hidden;
  background: #090d12;
}

.mobile-blocked-panel {
  width: min(420px, calc(100vw - 32px));
  padding: 28px 22px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  text-align: center;
  background: #111820;
  box-shadow: 0 24px 70px rgba(0,0,0,0.48);
}

.mobile-blocked-panel img {
  display: block;
  width: 112px;
  height: 84px;
  margin: 0 auto 12px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.48));
}

.mobile-blocked-panel h1 {
  font-size: 34px;
  line-height: 1.18;
}

.mobile-blocked-panel p:not(.eyebrow) {
  margin: 18px 0 0;
  color: #d7e4ee;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.75;
}

.title-screen {
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at center, rgba(255,255,255,0.06), transparent 38%),
    #060a10;
}

.title-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--game-width);
  height: var(--game-height);
  flex: 0 0 auto;
  transform: translate(-50%, -50%) scale(var(--frame-scale));
  transform-origin: center;
}

.title-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 26px 90px rgba(0,0,0,0.55);
  background:
    linear-gradient(180deg, rgba(5, 8, 12, 0.12), rgba(5, 8, 12, 0.72)),
    url("assets/images/title-background-v2.png") center / cover no-repeat;
}

.title-content {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 900px;
  height: 500px;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 28px;
  text-align: center;
  transform: translate(-50%, -50%);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1;
}

h1 {
  font-size: clamp(32px, 5.2vw, 60px);
  line-height: 1.02;
  text-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
}

.title-content h1 {
  font-size: 60px;
}

.title-copy {
  width: auto;
  margin: 12px 0 0;
  color: #d7e4ee;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.45;
  text-shadow: 0 6px 20px rgba(0,0,0,0.55);
}

.title-copy span {
  display: block;
  white-space: nowrap;
}

.title-actions {
  justify-content: center;
}

.title-actions button {
  min-width: 172px;
  box-shadow: 0 14px 32px rgba(0,0,0,0.28);
}

.title-actions button.locked {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.64;
}

.settings-button {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 7;
  display: grid;
  place-items: center;
  padding: 0;
  color: #f6f1e8;
  background: rgba(8,12,17,0.72);
  border-color: rgba(255,255,255,0.28);
  box-shadow: 0 10px 24px rgba(0,0,0,0.3);
}

.settings-button span {
  font-size: 25px;
  line-height: 1;
}

.settings-button:hover {
  color: #ffe06c;
  border-color: rgba(255,224,108,0.62);
  background: rgba(36,31,18,0.78);
}

.settings-overlay {
  position: absolute;
  inset: 0;
  z-index: 32;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(4, 6, 9, 0.72);
  backdrop-filter: blur(5px);
}

.settings-panel {
  width: 440px;
  max-width: calc(100vw - 32px);
}

.volume-control {
  margin-top: 20px;
  text-align: left;
}

.volume-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  color: #f6f1e8;
  font-size: 15px;
  font-weight: 900;
}

.volume-label output {
  min-width: 48px;
  color: #ffe06c;
  text-align: right;
}

.volume-control input[type="range"] {
  width: 100%;
  height: 28px;
  margin: 0;
  accent-color: #f4c04f;
  cursor: pointer;
}

.settings-toggle {
  min-height: 42px;
  background: rgba(255,255,255,0.14);
}

.settings-toggle.off {
  color: var(--muted);
  background: rgba(255,255,255,0.06);
}

.reset-progress-button {
  position: absolute;
  right: 18px;
  bottom: 18px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(8,12,17,0.58);
  border-color: rgba(255,255,255,0.18);
  font-size: 12px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.24);
}

.reset-progress-button:hover {
  color: #ff9aa5;
  border-color: rgba(255,101,116,0.46);
  background: rgba(56,18,24,0.62);
}

.debug-exit-button {
  position: absolute;
  right: 158px;
  bottom: 18px;
  z-index: 6;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  color: #8ee8ff;
  background: rgba(8,12,17,0.72);
  border-color: rgba(142,232,255,0.38);
  font-size: 12px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.24);
  white-space: nowrap;
}

.debug-exit-button:hover {
  color: #dff9ff;
  border-color: rgba(142,232,255,0.72);
  background: rgba(16,42,51,0.74);
}

.debug-mosquito-button {
  position: absolute;
  right: 30px;
  bottom: 64px;
  z-index: 6;
  width: 68px;
  height: 52px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  touch-action: none;
  -webkit-touch-callout: none;
}

.debug-mosquito-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,0.52));
  animation: debugMosquitoFloat 2.8s ease-in-out infinite;
}

.debug-mosquito-speech {
  position: absolute;
  right: -2px;
  bottom: calc(100% + 9px);
  width: max-content;
  max-width: 210px;
  padding: 8px 11px;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 8px;
  color: #172029;
  background: #f6f1e8;
  box-shadow: 0 10px 26px rgba(0,0,0,0.38);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(5px);
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms;
}

.debug-mosquito-speech::after {
  content: "";
  position: absolute;
  right: 25px;
  top: 100%;
  border: 7px solid transparent;
  border-top-color: #f6f1e8;
}

.debug-mosquito-speech.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.debug-mosquito-button::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 3px;
  border-radius: 3px;
  background: #f4c04f;
  transform: scaleX(0);
  transform-origin: left;
}

.debug-mosquito-button.holding::after {
  animation: debugHoldProgress 10s linear forwards;
}

.debug-command-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(4, 6, 9, 0.72);
  backdrop-filter: blur(5px);
}

.debug-command-panel {
  width: min(440px, calc(100vw - 32px));
}

.debug-command-hint {
  margin: 20px 0 0;
  color: #f4c04f !important;
  font-weight: 900;
}

.debug-command-status {
  display: block;
  min-height: 24px;
  margin: 14px 0 4px;
  color: #d7e4ee;
}

.debug-command-overlay.error .debug-command-status {
  color: #ff9aa5;
}

.debug-command-overlay.success .debug-command-status {
  color: #78ffb1;
}

@keyframes debugHoldProgress {
  to { transform: scaleX(1); }
}

@keyframes debugMosquitoFloat {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(-5px) rotate(-3deg); }
}

h2 {
  font-size: clamp(26px, 4vw, 48px);
}

.title-swarm {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  pointer-events: none;
  border-radius: 8px;
}

.title-swarm i {
  position: absolute;
  width: 44px;
  height: 34px;
  background: url("assets/images/mosquito-types/normal.png") center / contain no-repeat;
  opacity: 0.82;
  filter: drop-shadow(0 10px 12px rgba(0,0,0,0.45));
  transition-property: left, top, transform;
  transition-timing-function: cubic-bezier(.33,.02,.22,1);
}

.title-actions,
.game-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.primary,
.secondary,
.mini-button,
.item-button,
.icon-button {
  min-height: 44px;
  border-radius: 8px;
  padding: 0 18px;
}

.primary {
  background: #e8ae38;
  color: #16100a;
}

.secondary {
  background: rgba(15, 22, 29, 0.7);
}

.danger {
  border-color: rgba(255, 101, 116, 0.5);
  color: #ffd9dd;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 auto 20px;
  max-width: 1120px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 8px;
  background: rgba(9, 13, 18, 0.72);
  backdrop-filter: blur(10px);
}

.icon-button {
  width: 48px;
  padding: 0;
  font-size: 22px;
}

.stage-grid,
.dex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
  max-width: 1120px;
  margin: 0 auto;
}

.stage-card,
.dex-card {
  position: relative;
  min-height: 178px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  text-align: left;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.055), transparent),
    rgba(9, 13, 18, 0.78);
  backdrop-filter: blur(10px);
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(0,0,0,0.28);
}

.dex-card {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 10px 14px;
  align-items: start;
}

.dex-card h3,
.dex-card p,
.dex-card strong {
  grid-column: 2;
}

.dex-sprite {
  grid-row: 1 / span 3;
  width: 78px;
  height: 78px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  background-color: rgba(255,255,255,0.07);
  filter: drop-shadow(0 8px 14px rgba(0,0,0,0.35));
  overflow: hidden;
}

.dex-sprite img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dex-sprite.unknown {
  background-image: none;
  display: grid;
  place-items: center;
}

.dex-sprite.unknown::before {
  content: "?";
  color: rgba(255,255,255,0.28);
  font-size: 40px;
  font-weight: 950;
}

.stage-card.locked {
  opacity: 0.48;
}

.stage-card.secret-stage {
  order: 99;
  border-color: rgba(255, 101, 116, 0.42);
  background:
    linear-gradient(135deg, rgba(255, 79, 154, 0.14), rgba(214, 156, 255, 0.08)),
    rgba(9, 13, 18, 0.8);
}

.stage-card.secret-stage .stage-number {
  color: #ff9aa5;
}

.stage-card.cleared {
  border-color: rgba(244, 192, 79, 0.42);
  background:
    linear-gradient(180deg, rgba(244,192,79,0.12), transparent),
    rgba(9, 13, 18, 0.8);
}

.stage-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: linear-gradient(90deg, #f4c04f, #8ee8ff);
  opacity: 0.72;
}

.stage-number {
  position: absolute;
  top: 12px;
  right: 14px;
  color: rgba(255,255,255,0.14);
  font-size: 44px;
  font-weight: 950;
  line-height: 1;
}

.stage-card h3,
.dex-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.stage-card p,
.dex-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.dex-card strong {
  color: #f4c04f;
  font-size: 12px;
  line-height: 1.45;
}

.stage-card strong,
.stage-card em {
  display: block;
  margin-top: 12px;
  font-style: normal;
}

.stage-card strong {
  color: #f6f1e8;
  font-size: 13px;
}

.stage-card em {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.game-screen {
  padding: 0;
  overflow: hidden;
  cursor: none;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(255,255,255,0.06), transparent 38%),
    #060a10;
}

.play-shell {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--game-width);
  height: var(--game-height);
  min-height: var(--game-height);
  border: 0;
  outline: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 26px 90px rgba(0,0,0,0.55);
  transform: translate(-50%, -50%) scale(var(--frame-scale));
  transform-origin: center;
}

#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
  background: #121820;
}

.hud {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 220px;
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 76px 76px 90px 118px;
  gap: 10px;
  pointer-events: none;
}

.sleep-meter i {
  display: block;
  height: 6px;
  margin-top: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  overflow: hidden;
}

.sleep-meter b {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #78ffb1, #f4c04f);
}

.hud > div,
.toolbelt,
.game-actions {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  backdrop-filter: blur(10px);
}

.hud > div {
  min-width: 86px;
  padding: 9px 12px;
}

.hud span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.hud strong {
  display: block;
  font-size: 22px;
}

.toolbelt {
  position: absolute;
  left: 14px;
  bottom: 14px;
  transform: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  width: auto;
  max-width: min(720px, calc(100vw - 180px));
}

.item-button {
  position: relative;
  display: grid;
  grid-template-columns: 34px auto;
  align-items: center;
  gap: 7px;
  min-width: 132px;
  padding: 4px 10px;
  font-size: 13px;
}

.item-button img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  pointer-events: none;
}

.item-button.active {
  background: #f4c04f;
  color: #19140b;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.2), 0 10px 28px rgba(244,192,79,0.22);
}

.item-button.available:not(.active) {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.42);
  filter: brightness(1.34);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.14),
    0 8px 20px rgba(0,0,0,0.16),
    0 0 16px rgba(244,192,79,0.34),
    0 0 28px rgba(142,232,255,0.18);
  animation: itemAvailableGlow 1.45s ease-in-out infinite alternate;
}

.item-button.cooldown {
  opacity: 0.58;
  cursor: not-allowed;
  filter: none;
  animation: none;
  box-shadow: none;
}

.item-button.locked {
  opacity: 0.42;
  cursor: not-allowed;
  filter: grayscale(0.65);
  animation: none;
  box-shadow: none;
}

.cooldown-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(0,0,0,0.58);
  color: #fff;
  font-size: 20px;
  font-weight: 950;
  pointer-events: none;
}

.game-actions {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 8px;
  margin: 0;
  display: flex;
  gap: 6px;
  width: auto;
}

.result-screen {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(255,255,255,0.06), transparent 38%),
    #060a10;
}

.pause-overlay {
  display: grid;
  place-items: center;
  background: rgba(4, 6, 9, 0.54);
  backdrop-filter: blur(2px);
}

.pause-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  cursor: auto;
}

.modal {
  width: min(440px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), transparent),
    rgba(8, 12, 17, 0.9);
  backdrop-filter: blur(14px);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
}

.modal h2 {
  font-size: clamp(26px, 3.4vw, 38px);
}

.modal p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.7;
  white-space: pre-line;
}

.modal button {
  width: 100%;
  margin-top: 10px;
}

.howto-panel {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), transparent),
    rgba(8, 12, 17, 0.9);
  backdrop-filter: blur(14px);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
}

.howto-panel h2 {
  font-size: clamp(26px, 3.4vw, 38px);
}

.howto-lead {
  max-width: 720px;
  margin: 10px auto 16px;
  color: var(--muted);
  line-height: 1.7;
}

.howto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.howto-panel .primary {
  width: min(320px, 100%);
  margin-top: 8px;
}

.result-modal {
  width: min(480px, calc(100vw - 32px));
  text-align: left;
}

.result-modal h2,
.result-modal .eyebrow {
  text-align: center;
}

#resultTitle.endless-grade {
  font-size: clamp(34px, 5vw, 52px);
  color: #ffe06c;
  text-shadow: 0 8px 24px rgba(0,0,0,0.45);
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0 6px;
}

.result-stats span {
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  color: #f6f1e8;
  font-size: 12px;
  font-weight: 900;
}

#weaponCursor {
  position: fixed;
  z-index: 30;
  width: 118px;
  height: 184px;
  pointer-events: none;
  transform: translate(-50%, -24%) scale(var(--frame-scale));
  background: url("assets/images/tool-swatter-v3.png") center / contain no-repeat;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.42));
}

#weaponCursor.racket {
  width: 132px;
  height: 204px;
  background-image: url("assets/images/tool-racket-v1.png");
  filter: drop-shadow(0 0 12px rgba(110, 220, 255, 0.85));
}

#weaponCursor.combo-power {
  width: 158px;
  height: 246px;
  filter: drop-shadow(0 0 18px rgba(255, 224, 108, 0.88)) drop-shadow(0 14px 22px rgba(0,0,0,0.42));
}

#weaponCursor.swatter.attack {
  width: 128px;
  height: 204px;
  background-image: url("assets/images/tool-swatter-hit-v2.png");
  transform: translate(-50%, -24%) scale(var(--frame-scale));
}

#weaponCursor.racket.attack {
  width: 142px;
  height: 218px;
  background-image: url("assets/images/tool-racket-hit-v2.png");
  transform: translate(-50%, -24%) scale(var(--frame-scale));
}

#weaponCursor.spray {
  width: 108px;
  height: 176px;
  background-image: url("assets/images/tool-spray-v1.png");
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.42));
}

#weaponCursor.coil {
  width: 126px;
  height: 126px;
  transform: translate(-50%, -58%) scale(var(--frame-scale));
  background-image: url("assets/images/tool-coil-v1.png");
  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.42));
}

.item-button.ready-flash {
  animation: readyFlash 0.9s ease-out;
  background: rgba(255, 224, 108, 0.28);
  border-color: rgba(255, 224, 108, 0.85);
  filter: brightness(1.28);
}

@keyframes readyFlash {
  0% { box-shadow: 0 0 0 0 rgba(255, 224, 108, 0.86); filter: brightness(1.7); }
  45% { box-shadow: 0 0 0 6px rgba(255, 224, 108, 0.22), 0 0 28px rgba(255, 224, 108, 0.64); filter: brightness(1.45); }
  100% { box-shadow: 0 0 0 0 rgba(255, 224, 108, 0); }
}

@keyframes itemAvailableGlow {
  0% {
    border-color: rgba(255,255,255,0.42);
    box-shadow:
      inset 0 0 0 1px rgba(255,255,255,0.12),
      0 8px 20px rgba(0,0,0,0.16),
      0 0 12px rgba(244,192,79,0.24),
      0 0 22px rgba(142,232,255,0.12);
  }
  100% {
    border-color: rgba(255,224,108,0.82);
    box-shadow:
      inset 0 0 0 1px rgba(255,255,255,0.22),
      0 8px 20px rgba(0,0,0,0.16),
      0 0 22px rgba(244,192,79,0.52),
      0 0 38px rgba(142,232,255,0.28);
  }
}

#weaponCursor.hide-ui {
  display: none !important;
}

@media (max-width: 720px) {
  html.native-app .screen {
    padding: 16px;
  }

  html.native-app .title-frame {
    width: calc(100vw - 32px);
    height: calc(100vh - 32px);
    min-height: 0;
    transform: translate(-50%, -50%);
  }

  html.native-app .title-content {
    width: calc(100% - 32px);
    height: calc(100% - 32px);
  }

  html.native-app .play-shell {
    width: calc(100vw - 12px);
    height: calc(100vh - 12px);
    min-height: 0;
    transform: translate(-50%, -50%);
  }

  html.native-app .hud {
    top: 8px;
    left: 8px;
    right: 8px;
    grid-template-columns: 1fr 52px 52px 66px 78px;
    gap: 5px;
  }

  html.native-app .hud strong {
    font-size: 17px;
  }

  html.native-app h1 {
    font-size: clamp(34px, 12vw, 58px);
  }

  html.native-app .title-copy {
    font-size: 15px;
  }

  html.native-app .hud > div {
    min-width: 0;
    padding: 6px 6px;
  }

  html.native-app .hud strong {
    font-size: 15px;
  }

  html.native-app .hud span {
    font-size: 10px;
  }

  html.native-app .toolbelt {
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    max-width: none;
    gap: 5px;
    padding: 6px;
  }

  html.native-app .game-actions {
    right: 8px;
    top: 58px;
    bottom: auto;
    width: auto;
  }

  html.native-app .item-button,
  html.native-app .mini-button {
    min-height: 38px;
    padding: 4px 8px;
    font-size: 12px;
  }

  html.native-app .item-button {
    grid-template-columns: 28px auto;
    min-width: calc(50% - 5px);
  }

  html.native-app .item-button img {
    width: 28px;
    height: 28px;
  }

  html.native-app .stage-grid,
  html.native-app .dex-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  html.native-app .panel-header {
    align-items: flex-start;
  }

  html.native-app .result-stats {
    grid-template-columns: 1fr;
  }

  html.native-app .debug-mosquito-button {
    right: 18px;
    bottom: 62px;
    width: 58px;
    height: 46px;
  }

  html.native-app .debug-exit-button {
    right: 158px;
    max-width: calc(100vw - 176px);
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
