:root {
  --mini-hue: 210;
}

body {
  overscroll-behavior: none;
}

.mini-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.entry {
  padding: 1rem;
}

.entry-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.entry-form fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.entry-form label,
.entry-form legend {
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
}

.color-picker {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.color-picker button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: var(--swatch);
  padding: 0;
  flex-shrink: 0;
}

.color-picker button[aria-pressed="true"] {
  border-color: var(--mini-text);
}

#enterBtn {
  background: transparent;
  color: var(--mini-text);
  border: 1px solid var(--mini-border);
}

.lobby {
  padding: 1rem;
  text-align: center;
}

.lobby > * + * {
  margin-top: 1rem;
}

#inviteWrap {
  word-break: break-all;
}

#inviteWrap .mini-label {
  display: block;
  margin-bottom: 4px;
}

.invite-url {
  margin: 0;
}

.game-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem;
  gap: 0.5rem;
}

.hud {
  width: 100%;
  max-width: 320px;
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  font-weight: 600;
}

#road {
  width: 100%;
  max-width: 320px;
  height: auto;
  touch-action: none;
  background: #0a0a0a;
  border-radius: 0.5rem;
}

.result {
  text-align: center;
}

.result > * + * {
  margin-top: 0.5rem;
}

.controls {
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  display: flex;
  gap: 0.75rem;
}

.control-btn {
  flex: 1;
  min-height: 56px;
  font-size: 1.125rem;
  user-select: none;
  background: transparent;
  color: var(--mini-text);
  border: 1px solid var(--mini-border);
}

@media (hover: hover) and (pointer: fine) {
  .control-btn:hover {
    background: var(--mini-surface-muted);
  }
}

.control-btn:active {
  transform: translateY(1px);
}

[hidden] {
  display: none !important;
}
