*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #ffffff;
  overflow: hidden;
  font-family: "Manrope", Helvetica, Arial, sans-serif;
}

#ui {
  top: 0;
  left: 0;
  right: 0;
  height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 28px;
  z-index: 0;
  background: none;
  pointer-events: none;
  overflow: visible;
  position: fixed;
  gap: 4px; /* controls spacing between ui-left, ui-bottom, ui-right */
}

#ui-left {
  font-size: clamp(1.2rem, 5vw, 3rem); /* scales with screen width */
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #d00000;
  pointer-events: none;
  text-align: center;
  margin-bottom: 2px;
  text-shadow: #d20101 1px 0 1px;
}

#ui-bottom {
  font-size: clamp(1.2rem, 5vw, 2.2rem); /* scales with screen width */
  font-weight: 500;
  margin-bottom: 10px;
  letter-spacing: 0.01em;
  color: #d00000;
  pointer-events: none;
  text-align: center;
  margin-top: -16px;
  text-shadow: #d20101 1px 0 1px;
}

#ui-right {
  display: flex;
  gap: 6px;
  pointer-events: all;
  flex-wrap: wrap; /* buttons wrap on small screens */
  justify-content: center;
}

#ui-right button {
  background: white;
  border: 1px solid #ddd;
  padding: 6px 14px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 20px;
  color: #111;
  transition: background 0.15s;
  touch-action: manipulation; /* removes 300ms tap delay on mobile */
  -webkit-tap-highlight-color: transparent;
}

#ui-right button:hover {
  background: #eee;
}

#hint {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(9px, 2vw, 11px);
  color: #aaa;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 100;
  white-space: nowrap;
}

#tooltip {
  position: fixed;
  pointer-events: none;
  z-index: 200;
  background: rgb(255, 255, 255);
  border: 1px solid #e0e0e0;
  padding: 8px 14px;
  font-size: 11px;
  color: #333;
  border-radius: 4px;
  display: none;
  max-width: 180px;
  line-height: 1.5;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* --- Mobile breakpoint --- */
@media (max-width: 480px) {
  #ui {
    padding: 12px 16px;
    gap: 2px; /* tighten spacing on mobile */
  }
  #ui-left {
    margin-bottom: 10px;
  }

  #ui-right button {
    padding: 8px 12px; /* slightly bigger tap target */
    font-size: 11px;
  }

  #hint {
    bottom: 16px;
    font-size: 9px;
    letter-spacing: 0.05em;
  }

  #tooltip {
    display: none !important; /* hide tooltip on mobile, no hover */
  }
}

.ccg {
  text-align: center;
  color: rgb(229, 141, 0);
}
