/* Chocolate Orange: full-screen canvas with a near-zero HUD (hint line, mute, replay). */
:root {
  --ink: #1d1d1f;
  --soft: rgba(29, 29, 31, 0.5);
  --pill: rgba(255, 255, 255, 0.82);
  --line: rgba(29, 29, 31, 0.1);
}

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

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #f4f4f5;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
  color: var(--ink);
  overscroll-behavior: none;
}

#c {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}

#c.dragging {
  cursor: grabbing;
}

#hint {
  position: fixed;
  left: 50%;
  bottom: calc(26px + env(safe-area-inset-bottom));
  transform: translate(-50%, 6px);
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--pill);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--soft);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#hint.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

#mute {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top));
  right: calc(14px + env(safe-area-inset-right));
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--soft);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

#mute:hover {
  color: var(--ink);
  background: rgba(29, 29, 31, 0.05);
}

#mute:active {
  transform: scale(0.92);
}

#mute .off {
  display: none;
}

#mute.muted .on {
  display: none;
}

#mute.muted .off {
  display: inline;
}

#again {
  position: fixed;
  left: 50%;
  bottom: calc(34px + env(safe-area-inset-bottom));
  transform: translate(-50%, 14px) scale(0.96);
  padding: 13px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.2, 0.9, 0.2, 1.1);
}

#again.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}

#again.show:active {
  transform: translate(-50%, 0) scale(0.96);
}
