:root {
  --bg: #efe3d3;
  --paper: #fffaf3;
  --ink: #1f1c18;
  --muted: #716a61;
  --accent: #a8342f;
  --line: #cdbfaa;
  --soft: #e7d7c2;
  --shadow: 0 18px 50px rgba(63, 50, 34, 0.10);
  --radius: 22px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Libre Franklin", system-ui, sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.55), transparent 38%),
    var(--bg);
  color: var(--ink);
}

button, input, textarea { font: inherit; }

button { cursor: pointer; }

.page-shell {
  width: min(860px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0 40px;
}

.hero {
  text-align: center;
  padding: 34px 16px 38px;
}

.hero.compact { padding-bottom: 24px; }

.eyebrow {
  font: 500 0.78rem/1.2 "DM Mono", monospace;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 14px;
}

.phone-art {
  width: 116px;
  height: 116px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  margin: 6px auto 22px;
  display: grid;
  place-items: center;
  background: var(--paper);
  box-shadow: 9px 9px 0 var(--soft);
}

.receiver {
  font-size: 54px;
  transform: rotate(-14deg);
}

h1, h2, p { margin-top: 0; }

h1 {
  font-size: clamp(2.35rem, 7vw, 5rem);
  letter-spacing: -0.055em;
  line-height: 0.98;
  max-width: 740px;
  margin: 0 auto 20px;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  letter-spacing: -0.035em;
  margin-bottom: 18px;
}

.lede {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
  max-width: 660px;
  margin: 0 auto;
}

.card {
  position: relative;
  background: rgba(255,250,243,.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 44px);
  margin: 24px 0;
}

.card-number {
  font: 500 .78rem/1 "DM Mono", monospace;
  color: var(--accent);
  margin-bottom: 12px;
}

.prompt-box {
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
  padding: 18px 0;
  margin: 8px 0 26px;
}

.prompt-label {
  font: 500 .78rem/1.2 "DM Mono", monospace;
  letter-spacing: .08em;
  margin-bottom: 12px;
}

.prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: .88rem;
}

.chip:hover,
.chip.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.recorder {
  border: 1px solid var(--ink);
  border-radius: 18px;
  padding: 22px;
  background: #f7ecde;
}

.recorder-display {
  background: #201f1b;
  color: #f8f0e4;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font: 400 .9rem/1.2 "DM Mono", monospace;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #817d73;
}

.status-dot.live {
  background: #ff4e46;
  box-shadow: 0 0 0 6px rgba(255,78,70,.14);
  animation: pulse 1.2s infinite;
}

.timer {
  font: 500 1.3rem/1 "DM Mono", monospace;
}

@keyframes pulse {
  50% { transform: scale(.8); opacity: .6; }
}

.controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button,
.text-button {
  border-radius: 999px;
  padding: 12px 18px;
  border: 1px solid var(--ink);
  font-weight: 700;
}

.primary-button {
  background: var(--ink);
  color: white;
}

.primary-button:hover:not(:disabled) { transform: translateY(-1px); }

.primary-button:disabled,
.secondary-button:disabled {
  opacity: .42;
  cursor: not-allowed;
}

.secondary-button {
  background: transparent;
  color: var(--ink);
}

.text-button {
  background: transparent;
  color: var(--accent);
  border-color: transparent;
  padding-left: 0;
  padding-right: 0;
}

.button-icon {
  color: #ff4e46;
  margin-right: 6px;
}

.preview {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.preview-title {
  font-weight: 700;
  margin-bottom: 10px;
}

audio { width: 100%; }

.microcopy {
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.55;
  margin: 16px 0 0;
}

form {
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 700;
  font-size: .92rem;
}

input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf9;
  color: var(--ink);
  padding: 13px 14px;
  outline: none;
}

input:focus, textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(31,28,24,.07);
}

textarea { resize: vertical; }

.consent-row {
  grid-template-columns: auto 1fr;
  align-items: start;
  font-weight: 400;
  line-height: 1.5;
}

.consent-row input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.submit-button {
  width: 100%;
  padding: 14px 20px;
}

.form-message {
  min-height: 1.2em;
  color: var(--muted);
  font-size: .9rem;
}

.form-message.error { color: #a61f1a; }
.form-message.success { color: #2e6a3a; }

.success-card {
  text-align: center;
  border: 2px solid var(--ink);
}

.success-icon {
  width: 62px;
  height: 62px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
}

.hidden { display: none !important; }

footer {
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
  padding: 18px;
}

/* Admin */
.admin-shell { max-width: 980px; }

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin: 20px 0;
}

.toolbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.message-list {
  display: grid;
  gap: 14px;
}

.message-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}

.message-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 12px;
}

.message-name {
  font-weight: 800;
  font-size: 1.08rem;
}

.message-meta,
.message-note {
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.5;
}

.message-note { margin: 10px 0; }

.message-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

.download-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  font-size: .9rem;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 34px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 620px) {
  .page-shell { width: min(100% - 20px, 860px); padding-top: 24px; }
  .hero { padding-top: 20px; }
  .card { padding: 22px; border-radius: 18px; }
  .recorder { padding: 16px; }
  .recorder-display { align-items: flex-start; }
  .controls .primary-button,
  .controls .secondary-button { flex: 1; }
  .admin-toolbar { align-items: flex-start; flex-direction: column; }
}

/* FêteFone export */
.export-card {
  border: 2px solid var(--ink);
}

.export-intro {
  margin-bottom: 22px;
  max-width: 760px;
}

.export-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.export-grid select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf9;
  color: var(--ink);
  padding: 13px 14px;
  outline: none;
}

.export-grid select:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(31,28,24,.07);
}

.field-help {
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.45;
  font-weight: 400;
}

.normalize-row {
  margin: 6px 0 20px;
}

.export-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.export-progress-wrap {
  margin-top: 18px;
}

.export-progress-track {
  width: 100%;
  height: 10px;
  background: var(--soft);
  border-radius: 999px;
  overflow: hidden;
}

.export-progress-bar {
  width: 0%;
  height: 100%;
  background: var(--ink);
  transition: width .2s ease;
}

.fetefone-file {
  display: inline-block;
  margin-top: 4px;
  font: 500 .76rem/1.25 "DM Mono", monospace;
  color: var(--accent);
}

@media (max-width: 620px) {
  .export-grid { grid-template-columns: 1fr; }
  .export-actions .primary-button,
  .export-actions .secondary-button { width: 100%; }
}

/* Mobile-first guest experience */
.hero-meta {
  margin: 18px auto 0;
  color: var(--muted);
  font: 500 .78rem/1.3 "DM Mono", monospace;
  letter-spacing: .02em;
}

.hero-meta span { margin: 0 7px; }

.progress-steps {
  width: min(520px, 100%);
  margin: -2px auto 22px;
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: center;
  padding: 0 12px;
}

.progress-step {
  display: grid;
  justify-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: .72rem;
}

.progress-step span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--paper);
  font: 500 .74rem/1 "DM Mono", monospace;
}

.progress-step strong {
  font-size: .72rem;
  font-weight: 700;
}

.progress-step.active,
.progress-step.complete { color: var(--ink); }

.progress-step.active span {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
  box-shadow: 0 5px 15px rgba(31,28,24,.16);
}

.progress-step.complete span {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.progress-line {
  height: 1px;
  background: var(--line);
  margin: 0 8px 22px;
}

.recorder-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
}

.record-button {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  text-align: left;
  border-radius: 17px;
}

.record-button-icon {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  flex: 0 0 35px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--accent);
  font-size: .88rem;
  box-shadow: inset 0 0 0 7px rgba(255,255,255,.14);
}

.record-button-copy {
  display: grid;
  gap: 3px;
}

.record-button-copy strong {
  font-size: 1rem;
  line-height: 1.1;
}

.record-button-copy small {
  font-size: .72rem;
  font-weight: 500;
  opacity: .68;
}

.stop-button {
  min-width: 145px;
  border-radius: 17px;
}

.preview-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 10px;
}

.preview-kicker {
  margin: 0 0 5px;
  color: var(--accent);
  font: 500 .7rem/1.2 "DM Mono", monospace;
  letter-spacing: .12em;
}

.preview-title { margin: 0; }

.preview-check {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: #e3eee2;
  color: #2e6a3a;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.preview-actions {
  margin-top: 14px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
}

.preview-actions .primary-button,
.preview-actions .secondary-button {
  min-height: 48px;
}

.details-card {
  scroll-margin-top: 14px;
}

@media (max-width: 620px) {
  body {
    background:
      radial-gradient(circle at 50% -5%, rgba(255,255,255,.72), transparent 38%),
      var(--bg);
  }

  .page-shell {
    width: min(100% - 18px, 860px);
    padding: 12px 0 28px;
  }

  .hero {
    padding: 18px 11px 24px;
  }

  .phone-art {
    width: 78px;
    height: 78px;
    margin: 4px auto 18px;
    box-shadow: 6px 6px 0 var(--soft);
  }

  .receiver { font-size: 38px; }

  h1 {
    font-size: clamp(2.45rem, 13vw, 3.8rem);
    line-height: .96;
    margin-bottom: 15px;
  }

  .lede {
    font-size: .98rem;
    line-height: 1.6;
    max-width: 34ch;
  }

  .hero-meta {
    margin-top: 14px;
    font-size: .7rem;
  }

  .progress-steps {
    margin-bottom: 14px;
    padding: 0 22px;
  }

  .progress-step strong { display: none; }
  .progress-line { margin-bottom: 0; }

  .card {
    padding: 20px 17px;
    margin: 12px 0;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(63, 50, 34, .09);
  }

  .card-number { margin-bottom: 8px; }

  h2 {
    font-size: 1.55rem;
    margin-bottom: 14px;
  }

  .prompt-box {
    margin: 4px -17px 20px;
    padding: 14px 17px 15px;
    overflow: hidden;
  }

  .prompt-label { margin-bottom: 10px; }

  .prompt-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 1px 1px 4px;
    margin-right: -17px;
  }

  .prompt-chips::-webkit-scrollbar { display: none; }

  .chip {
    flex: 0 0 auto;
    min-height: 39px;
    padding: 9px 13px;
    font-size: .84rem;
  }

  .recorder {
    padding: 14px;
    border-radius: 17px;
  }

  .recorder-display {
    padding: 14px 15px;
    margin-bottom: 12px;
    border-radius: 11px;
    align-items: center;
  }

  .status-row { font-size: .8rem; }
  .timer { font-size: 1.18rem; }

  .recorder-controls {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .record-button {
    width: 100%;
    min-height: 76px;
    border-radius: 16px;
    justify-content: flex-start;
    padding: 13px 20px;
  }

  .record-button-icon {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .record-button-copy strong { font-size: 1.08rem; }
  .record-button-copy small { font-size: .75rem; }

  .stop-button {
    width: 100%;
    min-height: 50px;
    border-radius: 15px;
  }

  .preview {
    margin: 18px -2px 0;
    padding-top: 16px;
  }

  .preview audio { margin: 3px 0 4px; }

  .preview-actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .preview-actions .primary-button {
    order: -1;
    width: 100%;
    min-height: 54px;
  }

  .preview-actions .secondary-button {
    width: 100%;
  }

  .microcopy {
    font-size: .78rem;
    line-height: 1.5;
  }

  form { gap: 15px; }

  input, textarea {
    min-height: 48px;
    padding: 13px;
    font-size: 16px; /* Prevents iOS Safari auto-zoom */
  }

  textarea { min-height: 88px; }

  .consent-row {
    padding: 5px 0;
    font-size: .85rem;
  }

  .consent-row input {
    width: 21px;
    height: 21px;
  }

  .submit-button {
    min-height: 56px;
    font-size: 1rem;
    border-radius: 16px;
  }

  .success-card {
    padding-top: 34px;
    padding-bottom: 34px;
  }

  footer { padding-bottom: max(18px, env(safe-area-inset-bottom)); }
}


/* =========================================================
   HOTLINE-INSPIRED NEON THEME
   Original styling inspired by neon phone-booth / music-video aesthetics.
   ========================================================= */
:root {
  --bg: #16001f;
  --paper: #23002e;
  --ink: #fff8fd;
  --muted: #caa9d6;
  --accent: #ff4fa3;
  --accent-2: #ff8a3d;
  --line: rgba(255,255,255,.16);
  --soft: rgba(255,79,163,.12);
  --shadow: 0 22px 70px rgba(255,79,163,.13);
  --radius: 26px;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -5%, rgba(255, 79, 163, .35), transparent 30%),
    radial-gradient(circle at 10% 35%, rgba(116, 68, 255, .22), transparent 35%),
    radial-gradient(circle at 92% 72%, rgba(255, 138, 61, .16), transparent 32%),
    linear-gradient(180deg, #260032 0%, #15001d 52%, #0e0013 100%);
  color: var(--ink);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.page-shell {
  position: relative;
  z-index: 1;
}

.hero {
  padding-top: 48px;
}

.eyebrow {
  color: #ff83c0;
  text-shadow: 0 0 14px rgba(255,79,163,.65);
}

.phone-art {
  border: 1px solid rgba(255,255,255,.34);
  background:
    radial-gradient(circle at 35% 25%, rgba(255,255,255,.16), transparent 35%),
    rgba(255,79,163,.08);
  box-shadow:
    0 0 18px rgba(255,79,163,.46),
    0 0 62px rgba(255,79,163,.26),
    inset 0 0 30px rgba(255,255,255,.035);
}

.receiver {
  filter: drop-shadow(0 0 12px rgba(255,79,163,.65));
}

h1 {
  font-weight: 800;
  text-shadow: 0 0 34px rgba(255,79,163,.16);
}

.neon-35 {
  color: #ff72b7;
  text-shadow:
    0 0 8px rgba(255,79,163,.85),
    0 0 25px rgba(255,79,163,.45),
    0 0 55px rgba(255,79,163,.22);
}

.lede,
.hero-meta,
.microcopy,
.message-meta,
.message-note,
.field-help {
  color: var(--muted);
}

.card {
  background:
    linear-gradient(180deg, rgba(49, 8, 63, .88), rgba(30, 3, 39, .93));
  border-color: rgba(255,255,255,.13);
  box-shadow:
    0 24px 80px rgba(0,0,0,.28),
    0 0 45px rgba(255,79,163,.055);
  backdrop-filter: blur(12px);
}

.card-number,
.preview-kicker,
.fetefone-file {
  color: #ff72b7;
}

.prompt-box {
  border-color: rgba(255,255,255,.14);
}

.chip {
  border-color: rgba(255,255,255,.18);
  color: #fbeef8;
  background: rgba(255,255,255,.035);
}

.chip:hover,
.chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(255,79,163,.34);
}

.recorder {
  border-color: rgba(255,255,255,.18);
  background:
    radial-gradient(circle at 50% 0%, rgba(255,79,163,.11), transparent 45%),
    rgba(10,0,15,.38);
}

.recorder-display {
  background: rgba(7,0,11,.78);
  color: #fff;
  border: 1px solid rgba(255,255,255,.07);
  box-shadow: inset 0 0 28px rgba(255,79,163,.06);
}

.status-dot {
  background: #725c78;
}

.status-dot.live {
  background: #ff4fa3;
  box-shadow:
    0 0 0 6px rgba(255,79,163,.12),
    0 0 20px rgba(255,79,163,.7);
}

.primary-button {
  border-color: transparent;
  background: linear-gradient(135deg, #ff4fa3, #f23886);
  color: #fff;
  box-shadow:
    0 0 18px rgba(255,79,163,.34),
    0 10px 30px rgba(0,0,0,.2);
}

.primary-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow:
    0 0 24px rgba(255,79,163,.58),
    0 15px 35px rgba(0,0,0,.24);
}

.secondary-button {
  background: rgba(255,255,255,.035);
  color: #fff;
  border-color: rgba(255,255,255,.19);
}

.secondary-button:hover:not(:disabled) {
  border-color: rgba(255,79,163,.68);
  background: rgba(255,79,163,.08);
}

.text-button,
.download-link {
  color: #ff72b7;
}

.record-button {
  background: linear-gradient(135deg, #ff4fa3 0%, #e7398c 58%, #ba35d0 100%);
}

.record-button-icon {
  background: #fff;
  color: #ff4fa3;
  box-shadow:
    0 0 0 7px rgba(255,255,255,.10),
    0 0 24px rgba(255,255,255,.24);
}

input,
textarea,
.export-grid select {
  background: rgba(8,0,13,.52);
  color: #fff;
  border-color: rgba(255,255,255,.17);
}

input::placeholder,
textarea::placeholder {
  color: #947c9c;
}

input:focus,
textarea:focus,
.export-grid select:focus {
  border-color: #ff72b7;
  box-shadow: 0 0 0 3px rgba(255,79,163,.13);
}

.progress-step span {
  background: #24002f;
  border-color: rgba(255,255,255,.18);
}

.progress-step.active,
.progress-step.complete {
  color: #fff;
}

.progress-step.active span {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 22px rgba(255,79,163,.46);
}

.progress-step.complete span {
  background: #ff8a3d;
  border-color: #ff8a3d;
  box-shadow: 0 0 18px rgba(255,138,61,.28);
}

.progress-line {
  background: rgba(255,255,255,.14);
}

.preview {
  border-color: rgba(255,255,255,.13);
}

.preview-check,
.success-icon {
  border-color: rgba(255,255,255,.32);
  box-shadow: 0 0 22px rgba(255,79,163,.18);
}

.success-card,
.export-card {
  border-color: rgba(255,79,163,.48);
}

.message-item,
.empty-state {
  background: rgba(36,0,47,.86);
  border-color: rgba(255,255,255,.13);
}

.export-progress-track {
  background: rgba(255,255,255,.09);
}

.export-progress-bar {
  background: linear-gradient(90deg, #ff4fa3, #ff8a3d);
}

.form-message.error { color: #ff8f8f; }
.form-message.success { color: #8fffb1; }

footer {
  color: #8f7399;
  letter-spacing: .12em;
  font-family: "DM Mono", monospace;
}

@media (max-width: 620px) {
  body {
    background-attachment: scroll;
  }

  .hero {
    padding: 28px 10px 25px;
  }

  .phone-art {
    width: 94px;
    height: 94px;
    margin-bottom: 20px;
  }

  .receiver {
    font-size: 44px;
  }

  h1 {
    font-size: clamp(2.75rem, 14vw, 4.25rem);
  }

  .lede {
    font-size: .98rem;
    line-height: 1.6;
  }

  .card {
    box-shadow:
      0 16px 45px rgba(0,0,0,.30),
      0 0 24px rgba(255,79,163,.05);
  }

  .record-button {
    min-height: 74px;
  }
}
