* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #0f172a;
  color: #f1f5f9;
  min-height: 100vh;
}

main {
  max-width: 600px;
  margin: 0 auto;
  padding: 1rem;
  padding-bottom: 2rem;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

h1 { font-size: 1.25rem; margin: 0; }
h2 { font-size: 1.15rem; margin: 0.25rem 0; }
h3 { font-size: 1rem; margin: 0.5rem 0; color: #cbd5e1; }

button {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 0.85rem 1.5rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: 0.5rem;
}

button:active { background: #2563eb; }
button[hidden] { display: none; }

.icon-btn {
  width: auto;
  background: transparent;
  font-size: 1.5rem;
  margin: 0;
  padding: 0.25rem 0.5rem;
}
.icon-btn:active { background: transparent; }

#viewfinder {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #000;
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

#video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overlay {
  position: absolute;
  inset: 18% 8%;
  border: 2px dashed rgba(255, 255, 255, 0.55);
  border-radius: 0.5rem;
  pointer-events: none;
}

#status {
  text-align: center;
  color: #94a3b8;
  margin: 0.5rem 0;
  min-height: 1.25rem;
}

.result-card {
  background: #1e293b;
  padding: 1rem;
  border-radius: 0.75rem;
  margin-bottom: 0.5rem;
}

.result-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  word-break: break-all;
}

.result-card p { margin: 0.25rem 0; }
.result-card hr {
  border: none;
  border-top: 1px solid #334155;
  margin: 0.75rem 0;
}

ul { padding-left: 1.25rem; margin: 0.5rem 0; }
li { margin-bottom: 0.5rem; }
.item-meta { color: #94a3b8; font-size: 0.85rem; }

label {
  display: block;
  margin-bottom: 0.75rem;
}

input {
  display: block;
  width: 100%;
  padding: 0.6rem;
  border-radius: 0.375rem;
  border: 1px solid #334155;
  background: #1e293b;
  color: #f1f5f9;
  font-size: 1rem;
  margin-top: 0.25rem;
}

.error {
  background: #7f1d1d;
  color: #fecaca;
  padding: 0.75rem;
  border-radius: 0.5rem;
  margin-top: 1rem;
}

.total { font-size: 1.1rem; }

.mock-tag {
  background: #f59e0b;
  color: #1e293b;
  font-weight: 700;
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  margin-left: 0.4rem;
}
