.l3pd-root {
  max-width: 400px;
  margin: 0 auto;
  font-family: 'Roboto', sans-serif;
  color: #ede9e3;
  background: #24263c;
  padding: 16px;
  box-sizing: border-box;
}

.l3pd-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
}

.l3pd-lives {
  display: inline-flex;
  gap: 4px;
}

.l3pd-life-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  background-color: #ed4729;
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  transform: rotate(180deg);
}

.l3pd-life-lost {
  opacity: 0.2;
}

#l3pd-canvas {
  display: block;
  width: 100%;
  height: auto;
  background: #24263c;
  border: 1px solid rgba(237, 233, 227, 0.2);
  touch-action: none;
}

.l3pd-stage {
  position: relative;
}

.l3pd-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(36, 38, 60, 0.92);
  text-align: center;
  padding: 16px;
  box-sizing: border-box;
  overflow-y: auto;
}

.l3pd-title {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 28px;
  margin: 0;
  color: #ede9e3;
}

.l3pd-instructions {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(237, 233, 227, 0.85);
  max-width: 26ch;
}

.l3pd-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0;
}

.l3pd-legend-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.l3pd-legend-label {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.05em;
  width: 50px;
  text-align: right;
  flex: none;
}

.l3pd-legend-label-catch {
  color: #ed4729;
}

.l3pd-legend-label-avoid {
  color: #3e6b6d;
}

.l3pd-legend-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex: none;
}

.l3pd-start-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.l3pd-secondary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.l3pd-btn {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #ed4729;
  color: #ede9e3;
  border: none;
  border-radius: 0;
  padding: 10px 24px;
  cursor: pointer;
}

.l3pd-btn-secondary {
  background: transparent;
  border: 1px solid #ede9e3;
}

.l3pd-btn-secondary.l3pd-btn-active {
  background: #3e6b6d;
  border-color: #3e6b6d;
}

.l3pd-scores-toggle {
  display: block;
  margin: 16px auto 0;
  padding: 8px 20px;
  font-size: 13px;
}

#l3pd-tilt-toggle {
  padding: 8px 20px;
  font-size: 13px;
}

#l3pd-initials {
  font-family: 'Roboto', monospace;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 20px;
  width: 5em;
  border: 1px solid #ede9e3;
  background: transparent;
  color: #ede9e3;
  padding: 6px;
  border-radius: 0;
}

.l3pd-boards {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.l3pd-board {
  flex: 1;
  min-width: 140px;
}

.l3pd-board h3 {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  font-size: 14px;
  margin: 0 0 8px;
  color: #ed4729;
}

.l3pd-board ol {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
}

.l3pd-credit-wrap {
  margin: 16px 0 0;
  text-align: center;
}

.l3pd-info-btn {
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(237, 233, 227, 0.35);
  background: transparent;
  color: rgba(237, 233, 227, 0.5);
  font-family: 'Roboto', sans-serif;
  font-size: 11px;
  font-style: italic;
  line-height: 1;
  cursor: pointer;
}

.l3pd-credit {
  margin: 8px 0 0;
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
  color: rgba(237, 233, 227, 0.45);
}

.l3pd-credit a {
  color: rgba(237, 233, 227, 0.6);
}

/* .l3pd-hidden must be declared after every rule it needs to override
   (.l3pd-overlay, .l3pd-boards) since all these selectors tie at (0,1,0)
   specificity and CSS falls back to source order on a tie. */
.l3pd-hidden {
  display: none;
}

@media (max-width: 479px) {
  .l3pd-root {
    padding: 8px;
  }

  .l3pd-title {
    font-size: 22px;
  }
}
