:root {
  --bg: #07090f;
  --panel: #10151f;
  --line: rgba(255, 255, 255, 0.09);
  --text: #eef2ff;
  --muted: #94a3b8;
  --sky: #38bdf8;
  --mint: #2dd4bf;
  --danger: #fb7185;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 420px at 10% -10%, rgba(56, 189, 248, 0.14), transparent 55%),
    radial-gradient(700px 360px at 100% 0%, rgba(45, 212, 191, 0.1), transparent 50%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.app {
  width: min(520px, 100%);
  margin: 0 auto;
  padding: calc(12px + var(--safe-t)) 12px calc(20px + var(--safe-b));
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}
h1 {
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
h1 em { font-style: normal; color: var(--mint); }
.pill {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--sky);
  white-space: nowrap;
}

.honest {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(251, 113, 133, 0.25);
  background: rgba(251, 113, 133, 0.08);
}
.honest b { color: #fecdd3; font-weight: 600; }

.stage {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
  aspect-ratio: 3 / 4;
  max-height: 52vh;
  margin-bottom: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
#video, #overlay, .viewer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#overlay { pointer-events: none; }
.viewer { background: #0a0e16; touch-action: none; }
.hud {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  font-size: 0.75rem;
  font-family: "JetBrains Mono", monospace;
  color: #e2e8f0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  margin-bottom: 12px;
}
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.row.row-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.btn {
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 8px 10px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.primary {
  border: 0;
  color: #041018;
  background: linear-gradient(135deg, #38bdf8, #2dd4bf);
  grid-column: span 1;
}
.btn.accent {
  border: 0;
  color: #041018;
  background: linear-gradient(135deg, #a78bfa, #38bdf8);
}
.btn.danger {
  border-color: rgba(251, 113, 133, 0.4);
  color: #fecdd3;
}
.btn.recording {
  animation: pulse 1.2s ease infinite;
  background: linear-gradient(135deg, #f43f5e, #fb7185);
  color: #fff;
  border: 0;
}
@keyframes pulse {
  50% { filter: brightness(1.15); }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 4px 0 8px;
  font-size: 0.8rem;
  color: var(--muted);
}
.field select {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0a0e16;
  color: var(--text);
  font: inherit;
  padding: 0 12px;
}
.hint {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}

.tips h2 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
}
.tips ul {
  padding-left: 1.15rem;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.5;
}
.tips li { margin-bottom: 4px; }

.foot {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.4;
  padding: 4px 2px;
}
