/* Layout override for Circle Circle — injected, does not change the game file. */

details {
  display: none !important;
}


/* Hide the top HUD only while the start / mode-select menu is open.
   Nodes stay in the DOM so the game can still update score, mute, etc. */
body.fit-menu .hud {
  display: none !important;
}


#games-back {
  position: fixed;
  z-index: 10000;
  top: auto;
  left: max(12px, env(safe-area-inset-left, 0px));
  bottom: max(12px, env(safe-area-inset-bottom, 0px));
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(7, 14, 26, 0.9);
  color: #e2e8f0;
  text-decoration: none;
  font: 650 13px/1.1 "Segoe UI", system-ui, sans-serif;
  border: 1px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Practice sandbox sits below the play area on every screen, not over the ring. */
.practice-dock,
.practice-dock.visible {
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  bottom: auto;
  transform: none;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  flex-shrink: 0;
  z-index: 5;
  margin: 0;
}
.practice-dock { display: none; }
.practice-dock.visible { display: flex; }

@media (min-width: 701px) {
  .app {
    max-width: 900px;
  }
}

@media (max-width: 700px) {
  html, body {
    height: 100%;
    max-height: 100svh;
  }
  body {
    padding: 8px 8px 0;
    min-height: 100dvh;
    min-height: 100svh;
    overflow: hidden;
  }
  .app {
    max-width: none;
    width: 100%;
    height: 100%;
    min-height: 0;
    gap: 0.5rem;
    padding-bottom: 52px;
  }
  .hud {
    padding: 0.55rem 0.7rem;
    gap: 0.5rem;
    flex-shrink: 0;
  }
  .stats { gap: 0.7rem; }
  .stat-value { font-size: 1.05rem; }
  .stage-wrap {
    aspect-ratio: auto;
    width: 100%;
    flex: 0 0 auto;
    align-self: center;
  }
  canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
  }

  /* Practice sandbox: sit below the play square, not over the ring. */
  .practice-dock,
  .practice-dock.visible {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    transform: none;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    flex-shrink: 0;
    z-index: 5;
    margin: 0;
  }
  .practice-dock { display: none; }
  .practice-dock.visible { display: flex; }
  .practice-dock .prac-chip {
    padding: 0.28rem 0.48rem;
    font-size: 0.72rem;
  }
}
