:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0f1115;
  color: #f5f5f5;
  --stage-aspect: 16/9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

main {
  width: min(900px, 100%);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

header h1 {
  margin-bottom: 0.25rem;
}

.section-title {
  margin: 0;
}

.stage {
  position: relative;
  width: 100%;
  background: #1b1f2a;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: var(--stage-aspect, 16/9);
  max-height: 85vh;
}

#camera,
#overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.counter-card {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  padding: 0.75rem 1rem;
  background: rgba(7, 10, 15, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  text-align: right;
  min-width: 140px;
}

.label {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: #bbb;
  margin: 0;
}

.count {
  font-size: 2.75rem;
  font-weight: 700;
  margin: 0;
}

.status {
  margin: 0;
  font-size: 0.85rem;
  color: #7bdcb5;
}

.tips {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}

.tips ul {
  margin: 0.5rem 0 0;
}

@media (max-width: 720px) {
  body {
    align-items: flex-start;
    padding: 1rem;
  }

  main {
    gap: 1rem;
  }

  .counter-card {
    right: 0.75rem;
    bottom: 0.75rem;
    min-width: 120px;
    padding: 0.6rem 0.85rem;
  }

  .count {
    font-size: 2.15rem;
  }
}
