:root {
  --bg: #0b0d0e;
  --panel: #141819;
  --panel-strong: #1b2021;
  --line: #343b3b;
  --line-soft: #252b2b;
  --text: #eef2ef;
  --muted: #9ba6a2;
  --accent: #8dff5a;
  --cyan: #55b7d9;
  --warning: #f0b44c;
  --danger: #e45959;
  --topbar-height: 54px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
canvas:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

a {
  color: var(--cyan);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#app {
  position: fixed;
  inset: 0;
  isolation: isolate;
  background: var(--bg);
}

#gameCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: var(--bg);
  touch-action: none;
}

.canvas-shell {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: #0b0d0e;
}

.canvas-shell img {
  width: min(24vw, 192px);
  height: min(24vw, 192px);
  opacity: 0.12;
}

.topbar {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--topbar-height) + var(--safe-top));
  padding: var(--safe-top) max(10px, var(--safe-right)) 0 max(10px, var(--safe-left));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  background: rgba(11, 13, 14, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  user-select: none;
}

.brand {
  min-width: 0;
  height: 100%;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.brand img {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
}

.brand b {
  color: var(--accent);
  font-weight: 800;
}

.mode-actions,
.session-actions {
  min-width: 0;
  display: flex;
  align-items: center;
}

.mode-actions {
  justify-content: center;
  gap: 4px;
}

.session-actions {
  justify-content: flex-end;
  gap: 6px;
}

.command,
.icon-button,
.primary,
.secondary,
.danger {
  min-height: 36px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.command {
  height: 38px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.command:hover,
.command[aria-pressed="true"] {
  background: var(--panel-strong);
  color: var(--text);
}

svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button {
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  background: transparent;
  color: var(--muted);
}

.icon-button:hover {
  color: var(--text);
  background: var(--panel-strong);
}

.voice-button[data-state="on"] {
  color: var(--accent);
  background: rgba(70, 122, 54, 0.24);
}

.voice-button[data-state="live"] {
  color: #101510;
  background: var(--accent);
}

.voice-button[data-state="denied"] {
  color: var(--danger);
}

.voice-panel {
  position: absolute;
  z-index: 30;
  top: calc(var(--topbar-height) + var(--safe-top) + 8px);
  right: max(10px, var(--safe-right));
  width: min(310px, calc(100% - 20px - var(--safe-left) - var(--safe-right)));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(20, 24, 25, 0.97);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(12px);
}

.voice-panel-head,
.voice-controls {
  display: flex;
  align-items: center;
}

.voice-panel-head {
  justify-content: space-between;
  gap: 12px;
}

.voice-panel-head > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.voice-panel-head strong {
  font-size: 13px;
}

.voice-panel-head span,
.voice-peers {
  color: var(--muted);
  font-size: 11px;
}

.voice-controls {
  gap: 6px;
  margin-top: 10px;
}

.voice-control {
  border: 1px solid var(--line-soft);
  background: var(--panel-strong);
}

.voice-control[data-active="true"] {
  color: var(--danger);
  border-color: #713a3a;
}

.voice-mode {
  min-width: 0;
  height: 38px;
  margin-left: auto;
  display: grid;
  grid-template-columns: auto auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.voice-mode button {
  min-width: 56px;
  padding: 0 9px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.voice-mode button + button {
  border-left: 1px solid var(--line);
}

.voice-mode button[data-active="true"] {
  color: var(--text);
  background: var(--panel-strong);
}

.voice-peers {
  display: block;
  margin-top: 9px;
}

.runtime-badge {
  height: 25px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.runtime-badge[data-level="loading"] {
  color: var(--warning);
  border-color: #6e542d;
}

.runtime-badge[data-level="ready"] {
  color: var(--accent);
  border-color: #467a36;
}

.runtime-badge[data-level="error"] {
  color: var(--danger);
  border-color: #713a3a;
}

.nick-field {
  width: 120px;
  height: 34px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
}

.nick-field svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.nick-field input {
  min-width: 0;
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.runtime-panel {
  position: absolute;
  z-index: 10;
  top: calc(50% + var(--topbar-height) / 2);
  left: 50%;
  width: min(520px, calc(100% - 32px));
  max-height: calc(100% - var(--topbar-height) - var(--safe-top) - 32px);
  padding: 22px;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 18px;
  overflow: auto;
  transform: translate(-50%, -50%);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(20, 24, 25, 0.96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.runtime-panel > img {
  grid-row: 1 / span 2;
  width: 76px;
  height: 76px;
}

.runtime-copy {
  min-width: 0;
}

.kicker {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 10px;
  line-height: 1.2;
  font-weight: 800;
}

.runtime-panel h1,
.tool-dialog h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
}

.runtime-panel #runtimeMessage {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.runtime-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.primary,
.secondary,
.danger {
  min-height: 38px;
  padding: 0 15px;
  font-size: 12px;
  font-weight: 800;
}

.primary {
  background: var(--accent);
  color: #101510;
}

.primary:hover:not(:disabled) {
  background: #afff8e;
}

.secondary {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  color: var(--text);
}

.secondary:hover:not(:disabled) {
  border-color: var(--muted);
}

.danger {
  background: transparent;
  border: 1px solid #733a3a;
  color: #ff9898;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.runtime-details {
  grid-column: 1 / -1;
  max-height: 150px;
  margin: 0;
  padding: 10px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: var(--bg);
  color: #f6a3a3;
  font: 11px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
}

body.engine-active .runtime-panel {
  display: none;
}

body.engine-active .canvas-shell {
  display: none;
}

body.engine-active .topbar {
  opacity: 0.72;
  transition: opacity 150ms ease;
}

body.engine-active .topbar:hover,
body.engine-active .topbar:focus-within {
  opacity: 1;
}

.toast-region {
  position: absolute;
  z-index: 80;
  top: calc(var(--topbar-height) + var(--safe-top) + 12px);
  right: max(12px, var(--safe-right));
  width: min(360px, calc(100% - 24px));
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--cyan);
  border-radius: 5px;
  background: var(--panel);
  color: var(--text);
  font-size: 12px;
  line-height: 1.4;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.36);
}

.toast.error {
  border-left-color: var(--danger);
}

.tool-dialog {
  width: min(560px, calc(100% - 24px));
  max-height: min(760px, calc(100% - 24px));
  padding: 0;
  overflow: auto;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62);
}

.tool-dialog::backdrop {
  background: rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(4px);
}

.wide-dialog {
  width: min(820px, calc(100% - 24px));
}

.compact-dialog {
  width: min(410px, calc(100% - 24px));
}

.dialog-head {
  position: sticky;
  z-index: 2;
  top: 0;
  min-height: 68px;
  margin: 0;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--panel);
}

.dialog-head h2 {
  font-size: 18px;
}

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

.import-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(240px, 0.75fr);
  gap: 0;
}

.import-picker,
.import-state {
  min-width: 0;
  padding: 16px;
}

.import-state {
  border-left: 1px solid var(--line-soft);
}

.drop-target {
  min-height: 214px;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed #596260;
  border-radius: 6px;
  text-align: center;
  background: #101313;
}

.drop-target[data-drag="true"] {
  border-color: var(--accent);
  background: #142016;
}

.drop-target > svg {
  width: 34px;
  height: 34px;
  color: var(--accent);
}

.drop-target strong {
  font-size: 15px;
}

.drop-target > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.picker-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.selection-summary {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  overflow: hidden;
}

.selection-summary > div {
  min-width: 0;
  padding: 9px 10px;
  display: grid;
  gap: 3px;
  border-right: 1px solid var(--line-soft);
}

.selection-summary > div:last-child {
  border-right: 0;
}

.selection-summary span,
.state-heading span,
.field-row > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.selection-summary strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}

.validation-message {
  min-height: 22px;
  padding-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.validation-message.error {
  color: #ff9898;
}

.validation-message.ok {
  color: var(--accent);
}

.state-heading {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.state-heading > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.state-heading strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  font: 11px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.revision-list,
.replay-list {
  margin-top: 10px;
  display: grid;
  gap: 7px;
}

.revision-item,
.replay-item {
  min-width: 0;
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  background: #111414;
}

.revision-item > div,
.replay-item > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.revision-item strong,
.replay-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.revision-item span,
.replay-item span {
  color: var(--muted);
  font-size: 10px;
}

.revision-item button,
.replay-item button {
  min-height: 30px;
  padding: 0 9px;
  border-radius: 4px;
  background: var(--panel-strong);
  color: var(--text);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.progress-area {
  padding: 12px 16px;
  border-top: 1px solid var(--line-soft);
}

.progress-area > div {
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
}

progress {
  width: 100%;
  height: 8px;
  display: block;
  overflow: hidden;
  border: 0;
  border-radius: 3px;
  background: var(--bg);
  accent-color: var(--accent);
}

progress::-webkit-progress-bar {
  background: var(--bg);
}

progress::-webkit-progress-value {
  background: var(--accent);
}

.dialog-footer {
  min-height: 62px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--line-soft);
}

.server-row {
  margin: 16px;
  padding: 13px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  background: #111414;
}

.server-light {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(228, 89, 89, 0.14);
}

.server-row[data-online="true"] .server-light {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(141, 255, 90, 0.14);
}

.server-row > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.server-row strong {
  font-size: 13px;
}

.server-row span {
  color: var(--muted);
  font-size: 11px;
}

.field-row {
  margin: 0 16px 16px;
  display: grid;
  gap: 6px;
}

.field-row input {
  width: 100%;
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  outline: 0;
  background: var(--bg);
  color: var(--text);
}

.replay-list {
  min-height: 80px;
  margin: 16px;
}

.empty-state {
  margin: 0;
  padding: 20px 12px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.menu-list {
  display: grid;
  padding: 8px;
}

.menu-list button {
  min-height: 46px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.menu-list button:hover {
  background: var(--panel-strong);
}

.license-copy {
  padding: 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.license-copy p {
  margin: 0 0 12px;
}

.license-copy p:last-child {
  margin-bottom: 0;
}

.touch-overlay {
  position: absolute;
  z-index: 15;
  inset: calc(var(--topbar-height) + var(--safe-top)) 0 0;
  display: none;
  overflow: hidden;
  pointer-events: none;
  touch-action: none;
  user-select: none;
}

.move-zone,
.look-zone,
.touch-button {
  touch-action: none;
}

.move-zone {
  position: absolute;
  left: var(--safe-left);
  bottom: var(--safe-bottom);
  width: 46%;
  height: 55%;
  pointer-events: auto;
}

.look-zone {
  position: absolute;
  inset: 0 0 0 38%;
  pointer-events: auto;
}

.stick-base {
  position: absolute;
  left: 26px;
  bottom: 28px;
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(238, 242, 239, 0.28);
  border-radius: 50%;
  background: rgba(11, 13, 14, 0.38);
  opacity: 0.72;
}

.stick-knob {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(238, 242, 239, 0.66);
  box-shadow: 0 0 0 5px rgba(11, 13, 14, 0.32);
  transform: translate3d(0, 0, 0);
}

.touch-actions {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.touch-button {
  position: absolute;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(238, 242, 239, 0.33);
  border-radius: 50%;
  background: rgba(11, 13, 14, 0.54);
  color: rgba(238, 242, 239, 0.88);
  font-size: 12px;
  font-weight: 900;
  pointer-events: auto;
  user-select: none;
}

.touch-button[data-active="true"] {
  border-color: var(--accent);
  background: rgba(70, 122, 54, 0.7);
  color: #fff;
}

.touch-button.fire {
  right: max(25px, var(--safe-right));
  bottom: calc(25px + var(--safe-bottom));
  width: 82px;
  height: 82px;
  border-color: rgba(228, 89, 89, 0.65);
  color: #ffb1b1;
}

.touch-button.jump {
  right: calc(112px + var(--safe-right));
  bottom: calc(38px + var(--safe-bottom));
}

.touch-button.use {
  right: calc(56px + var(--safe-right));
  bottom: calc(118px + var(--safe-bottom));
}

.touch-button.reload {
  right: calc(128px + var(--safe-right));
  bottom: calc(108px + var(--safe-bottom));
}

.touch-button.crouch {
  right: calc(190px + var(--safe-right));
  bottom: calc(38px + var(--safe-bottom));
}

.touch-button.weapon-prev,
.touch-button.weapon-next,
.touch-button.score,
.touch-button.ptt,
.touch-button.pause {
  width: 42px;
  height: 42px;
  font-size: 9px;
}

.touch-button.weapon-prev {
  right: calc(196px + var(--safe-right));
  top: 18px;
}

.touch-button.weapon-next {
  right: calc(146px + var(--safe-right));
  top: 18px;
}

.touch-button.score {
  right: calc(96px + var(--safe-right));
  top: 18px;
}

.touch-button.ptt {
  right: calc(46px + var(--safe-right));
  top: 18px;
  color: #9cddf5;
}

.touch-button.ptt[data-voice-live="true"] {
  border-color: var(--accent);
  color: #111711;
  background: var(--accent);
}

.touch-button.ptt:disabled {
  opacity: 0.38;
  pointer-events: none;
}

.touch-button.pause {
  right: max(4px, var(--safe-right));
  top: 18px;
}

@media (pointer: coarse), (max-width: 900px) {
  body.engine-active .touch-overlay {
    display: block;
  }
}

@media (max-width: 760px) {
  :root {
    --topbar-height: 50px;
  }

  .topbar {
    gap: 4px;
    padding-left: max(4px, var(--safe-left));
    padding-right: max(4px, var(--safe-right));
  }

  .brand {
    width: 38px;
  }

  .brand img {
    width: 30px;
    height: 30px;
  }

  .brand span,
  .command span,
  .runtime-badge {
    display: none;
  }

  .mode-actions {
    justify-content: flex-start;
    gap: 0;
  }

  .command,
  .icon-button {
    width: 38px;
    min-width: 38px;
    padding: 0;
  }

  .nick-field {
    width: 82px;
    padding: 0 6px;
  }

  .runtime-panel {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 13px;
    padding: 16px;
  }

  .runtime-panel > img {
    width: 54px;
    height: 54px;
  }

  .runtime-panel h1 {
    font-size: 18px;
  }

  .runtime-actions {
    grid-column: 1 / -1;
  }

  .import-layout {
    grid-template-columns: 1fr;
  }

  .import-state {
    border-top: 1px solid var(--line-soft);
    border-left: 0;
  }

  .drop-target {
    min-height: 180px;
    padding: 18px 12px;
  }
}

@media (max-width: 400px) {
  .nick-field {
    width: 66px;
  }

  .session-actions {
    gap: 1px;
  }

  .runtime-panel {
    width: calc(100% - 20px);
  }
}

@media (orientation: portrait) and (pointer: coarse) {
  .move-zone {
    width: 52%;
    height: 44%;
  }

  .look-zone {
    left: 36%;
  }

  .stick-base {
    left: 18px;
    bottom: calc(56px + var(--safe-bottom));
    width: 104px;
    height: 104px;
  }

  .touch-button.fire {
    right: max(18px, var(--safe-right));
    bottom: calc(55px + var(--safe-bottom));
    width: 76px;
    height: 76px;
  }

  .touch-button.jump {
    right: calc(104px + var(--safe-right));
    bottom: calc(58px + var(--safe-bottom));
  }

  .touch-button.use {
    right: calc(37px + var(--safe-right));
    bottom: calc(143px + var(--safe-bottom));
  }

  .touch-button.reload {
    right: calc(109px + var(--safe-right));
    bottom: calc(137px + var(--safe-bottom));
  }

  .touch-button.crouch {
    right: calc(178px + var(--safe-right));
    bottom: calc(58px + var(--safe-bottom));
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .stick-base {
    left: 18px;
    bottom: 18px;
    width: 94px;
    height: 94px;
  }

  .touch-button.fire {
    right: max(18px, var(--safe-right));
    bottom: calc(16px + var(--safe-bottom));
    width: 72px;
    height: 72px;
  }

  .touch-button.jump {
    right: calc(98px + var(--safe-right));
    bottom: calc(20px + var(--safe-bottom));
  }

  .touch-button.use {
    right: calc(42px + var(--safe-right));
    bottom: calc(94px + var(--safe-bottom));
  }

  .touch-button.reload {
    right: calc(108px + var(--safe-right));
    bottom: calc(88px + var(--safe-bottom));
  }

  .touch-button.crouch {
    right: calc(168px + var(--safe-right));
    bottom: calc(20px + var(--safe-bottom));
  }
}

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