body { padding: 0; margin: 0 }
#unity-container { position: absolute }
#unity-container.unity-desktop { left: 50%; top: 50%; transform: translate(-50%, -50%) }
#unity-container.unity-mobile { position: fixed; width: 100%; height: 100% }
#unity-canvas { background: #231F20 }
.unity-mobile #unity-canvas { width: 100%; height: 100% }
#unity-loading-bar { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none }
#unity-logo { width: 154px; height: 130px; background: url('unity-logo-dark.png') no-repeat center }
#unity-progress-bar-empty { width: 141px; height: 18px; margin-top: 10px; margin-left: 6.5px; background: url('progress-bar-empty-dark.png') no-repeat center }
#unity-progress-bar-full { width: 0%; height: 18px; margin-top: 10px; background: url('progress-bar-full-dark.png') no-repeat center }
#unity-footer { position: relative }
.unity-mobile #unity-footer { display: none }
#unity-logo-title-footer { float:left; width: 102px; height: 38px; background: url('unity-logo-title-footer.png') no-repeat center }
#unity-build-title { float: right; margin-right: 10px; line-height: 38px; font-family: arial; font-size: 18px }
#unity-fullscreen-button { cursor:pointer; float: right; width: 38px; height: 38px; background: url('fullscreen-button.png') no-repeat center }
#unity-warning { position: absolute; left: 50%; top: 5%; transform: translate(-50%); background: white; padding: 10px; display: none }

/* --- Keybind legend -------------------------------------------------------
   An HTML/CSS overlay rather than Unity UI: this project has no Canvas in the
   scene, so doing it in-engine would mean adding a whole uGUI/UI Toolkit stack
   for three lines of static text. */

/* Positioning context for the legend. line-height:0 kills the inline descender
   gap under the canvas, which would otherwise nudge the footer down a few px. */
#claw-stage { position: relative; line-height: 0 }
.unity-mobile #claw-stage { width: 100%; height: 100% }

#claw-legend {
  position: absolute;
  right: 14px;
  bottom: 14px;
  /* Revealed by index.html once createUnityInstance resolves, so it never
     overlaps the loading bar or the splash screen. */
  display: none;
  padding: 10px 14px 11px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(16, 18, 22, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #e8eaed;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
  /* The canvas must keep pointer and keyboard focus — the legend is decoration
     and must never intercept an event meant for the game. */
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

/* A keyboard legend is noise on a touch device, which has no keys to press. */
.unity-mobile #claw-legend { display: none !important }

#claw-legend-title {
  margin-bottom: 7px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(232, 234, 237, 0.55);
}

#claw-legend dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0 }
#claw-legend dt { margin: 0; white-space: nowrap }
#claw-legend dd { margin: 0; align-self: center; color: rgba(232, 234, 237, 0.9) }

#claw-legend .claw-legend-note {
  display: block;
  font-size: 11px;
  color: rgba(232, 234, 237, 0.5);
}

#claw-legend kbd {
  display: inline-block;
  min-width: 11px;
  margin-right: 3px;
  padding: 2px 6px 3px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.09);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1;
  text-align: center;
  color: #f4f5f7;
}
#claw-legend kbd:last-child { margin-right: 0 }
