:root {
  --bg: #0b0e14;
  --surface: #141923;
  --surface-2: #1c2230;
  --border: #2a3142;
  --text: #e5e9f0;
  --muted: #8b93a7;
  --accent: #6aa7ff;
  --accent-hover: #8bbbff;
  --danger: #ef4444;
  --success: #22c55e;
  --radius: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.logo-banner {
  display: block;
  width: 100%;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.logo { display: block; width: 100%; height: auto; }

.wrap {
  max-width: 820px;
  margin: 32px auto;
  padding: 0 20px 64px;
}
h1 { font-size: 28px; margin: 0 0 8px; }
.lede { color: var(--muted); margin: 0 0 28px; }
h2 { font-size: 16px; margin: 0 0 14px; letter-spacing: 0.02em; color: var(--muted); text-transform: uppercase; }
h3 { font-size: 14px; margin: 18px 0 8px; color: var(--muted); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
}

.guidance p { margin: 0 0 12px; color: var(--text); }
.guidance ul { margin: 0; padding-left: 22px; color: var(--text); }
.guidance li { margin: 6px 0; }
.guidance li strong { color: var(--text); }
.guidance li:not(:has(strong)) { color: var(--muted); }

label { display: block; margin-bottom: 10px; color: var(--muted); font-size: 13px; }
.req { color: var(--danger); font-weight: 600; margin-left: 2px; }
.opt { color: var(--muted); font-size: 11px; font-weight: 400; margin-left: 6px; text-transform: uppercase; letter-spacing: 0.06em; }

input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
  margin-top: 6px;
  outline: none;
}
input:focus, textarea:focus { border-color: var(--accent); }

@keyframes onAutoFillStart { from {} to {} }
@keyframes onAutoFillCancel { from {} to {} }
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--surface-2) inset;
  caret-color: var(--text);
  transition: background-color 9999s ease-in-out 0s;
  animation-name: onAutoFillStart;
}
input:not(:-webkit-autofill) {
  animation-name: onAutoFillCancel;
}
textarea { resize: vertical; min-height: 110px; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.grid-2 .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .grid-2 { grid-template-columns: 1fr; } }

.file-drop {
  display: block;
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 22px;
  text-align: center;
  cursor: pointer;
  background: var(--surface-2);
  color: var(--muted);
  transition: border-color .15s;
}
.file-drop:hover { border-color: var(--accent); color: var(--text); }
.file-drop input[type="file"] { display: none; }

.video-grid {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 16px;
  align-items: start;
}
@media (max-width: 640px) { .video-grid { grid-template-columns: 1fr; } }

.video-box {
  position: relative;
  background: black;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 16/9;
}
.video-box video { width: 100%; height: 100%; object-fit: cover; }
.timer {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,0.6);
  padding: 4px 8px;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}
.timer.recording { background: rgba(239,68,68,0.85); }

.controls { display: flex; flex-direction: column; gap: 8px; }

#recordedWrap video {
  width: 100%;
  max-height: 360px;
  border-radius: 8px;
  background: black;
}

.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: all .15s;
}
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0b0e14;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; }
.btn-lg { padding: 12px 20px; font-size: 16px; width: 100%; }

.progress {
  height: 6px; background: var(--surface-2); border-radius: 3px; margin-top: 12px; overflow: hidden;
}
.bar { height: 100%; width: 0; background: var(--accent); transition: width .2s; }

.status-msg { margin-top: 10px; color: var(--muted); font-size: 13px; min-height: 18px; }
.status-msg.error { color: var(--danger); }
.status-msg.ok { color: var(--success); }

/* --- Receipt --- */
.receipt-card { padding: 0; overflow: hidden; }
.receipt {
  background: #ffffff;
  color: #1a1f2b;
  padding: 36px 40px;
  font-family: "Georgia", "Times New Roman", serif;
}
.receipt-header {
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 2px solid #1a1f2b;
  padding-bottom: 18px;
  margin-bottom: 22px;
}
.receipt-logo {
  height: 64px;
  width: auto;
  object-fit: contain;
}
.receipt-title .eyebrow {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 4px;
}
.receipt-title h2 {
  font-family: "Georgia", serif;
  font-size: 24px;
  margin: 0;
  color: #1a1f2b;
  text-transform: none;
  letter-spacing: normal;
}
.receipt-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.receipt-status .dot {
  width: 8px; height: 8px; border-radius: 50%;
}
.receipt-status.success { background: #dcfce7; color: #166534; }
.receipt-status.success .dot { background: #16a34a; }
.receipt-status.failure { background: #fee2e2; color: #991b1b; }
.receipt-status.failure .dot { background: #dc2626; }

.receipt-id-block {
  text-align: center;
  background: #f3f4f6;
  border: 1px dashed #9ca3af;
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 26px;
}
.receipt-id-label {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 6px;
}
.receipt-id {
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #111827;
  word-break: break-all;
}

.receipt-details {
  margin: 0 0 24px;
  padding: 0;
}
.receipt-details > div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid #e5e7eb;
  align-items: baseline;
}
.receipt-details > div:last-child { border-bottom: none; }
.receipt-details dt {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6b7280;
  margin: 0;
}
.receipt-details dd {
  margin: 0;
  color: #111827;
  font-size: 15px;
  word-break: break-word;
  white-space: pre-wrap;
}

.receipt-footer {
  border-top: 1px solid #e5e7eb;
  padding-top: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 12px;
  color: #6b7280;
  text-align: center;
}

.receipt-actions {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.receipt-actions .btn { flex: 1; }

.turnstile-wrap { min-height: 65px; }
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
}
