* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  padding: 1rem;
  background: #fef6e4;
  color: #222;
}

.party-name {
  text-align: center;
  font-size: 1.4rem;
  margin: 0.5rem 0 1rem;
}

.viewing-banner {
  max-width: 480px;
  margin: 0 auto 0.75rem;
  padding: 0.6rem 0.9rem;
  background: #fff3cd;
  border: 1px solid #ffe08a;
  border-radius: 10px;
  font-size: 0.9rem;
  text-align: center;
}

.viewing-banner a {
  color: #222;
  font-weight: bold;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
}

.nav-links .back-button {
  flex: 1;
}

.card {
  max-width: 480px;
  margin: 0 auto;
  background: white;
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.progress {
  color: #888;
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
}

.target-photo {
  width: 100%;
  border-radius: 12px;
  margin: 0.75rem 0;
}

.hint {
  color: #555;
  font-size: 0.95rem;
}

.big-button {
  display: block;
  width: 100%;
  font-size: 1.2rem;
  padding: 1rem;
  margin-top: 0.75rem;
  border: none;
  border-radius: 12px;
  background: #ff8552;
  color: white;
  font-weight: bold;
}

.big-button:disabled {
  background: #ccc;
  color: #888;
}

.back-button {
  display: block;
  width: 100%;
  padding: 0.6rem;
  margin-top: 0.5rem;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #888;
  text-decoration: underline;
  text-align: center;
}

.upload-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.camera-section {
  margin-top: 0.75rem;
}

.camera-frame {
  position: relative;
}

.camera-video,
.camera-canvas {
  display: block;
  width: 100%;
  border-radius: 12px;
  background: #111;
}

/* `display: block` above beats the browser's built-in [hidden] { display: none }
   at equal specificity, so the video stayed visible under the captured-photo
   canvas after Take Photo. Re-assert it explicitly. */
.camera-video[hidden],
.camera-canvas[hidden] {
  display: none;
}

.camera-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.35;
  pointer-events: none;
  border-radius: 12px;
}

.camera-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.fallback-upload {
  margin-top: 1rem;
}

.fallback-upload summary {
  color: #888;
  cursor: pointer;
}

.sup-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.sup-table th, .sup-table td {
  text-align: left;
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid #eee;
}

.thumb-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.thumb-row figure {
  margin: 0;
  width: 120px;
}

.thumb {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
}

.thumb-row figcaption {
  font-size: 0.75rem;
  color: #888;
  text-align: center;
}
