[x-cloak] { display: none !important; }

:root {
  --paper: #F7F1E3;
  --ink: #1A1712;
  --vermilion: #E34234;
  --green: #4CBB17;
  --gold: #C9A227;
  --teal: #0E3B3E;
  --muted: #5C574E;
  --radius: 6px;
  --shadow: 3px 3px 0 var(--ink);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --touch: 64px;
  --font: "Archivo", "Noto Naskh Arabic", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 18px; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.45;
  min-height: 100vh;
  /* clip alone: pairing it with overflow-y makes body a scroll container,
     which stops position:sticky resolving against the viewport */
  overflow-x: clip;
}

a { color: var(--ink); }

h1, h2, h3 { font-weight: 700; line-height: 1.2; margin: 0 0 var(--space-3); }

.container {
  width: min(960px, 100% - 2rem);
  margin-inline: auto;
}

.site-header {
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  padding: var(--space-3) 0;
}

.site-header.employer {
  background: var(--teal);
  color: var(--paper);
  border-bottom-color: var(--gold);
}

.site-header.employer a { color: var(--paper); }

.brand {
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch);
  min-width: var(--touch);
  padding: 0 var(--space-4);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--vermilion);
  color: var(--paper);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.btn-secondary {
  background: var(--paper);
  color: var(--ink);
}

.btn-green {
  background: var(--green);
  color: var(--ink);
}

.btn-block { width: 100%; }

.hero {
  padding: var(--space-6) 0 var(--space-5);
}

.hero h1 {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  max-width: 16ch;
}

.hero .sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 36ch;
  margin-bottom: var(--space-4);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.landing-cta {
  margin-top: var(--space-5);
  gap: var(--space-3);
}

.landing-cta .btn {
  font-family: "Noto Naskh Arabic", "Archivo", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.3;
  min-height: 64px;
  padding: var(--space-3) var(--space-4);
  border-width: 2px;
  box-shadow: var(--shadow);
  direction: rtl;
  text-align: center;
  flex: 0 1 auto;
  max-width: 14rem;
  width: auto;
}

.landing-cta .btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.landing-cta-secondary {
  font-family: "Archivo", sans-serif;
  direction: ltr;
}

.rule {
  border: 0;
  border-top: 1px solid var(--gold);
  margin: var(--space-4) 0;
}

.card-plain {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: var(--space-3);
  background: var(--paper);
}

/* Document scrolls; topbar + dock stick as opaque paper panels */
.chat-app {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: calc(100vh - 72px);
  padding: 0 var(--space-3) var(--space-3);
  box-sizing: border-box;
}

.chat-topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  flex-shrink: 0;
  background: var(--paper);
  padding: var(--space-3) 0 var(--space-2);
}

.chat-topbar-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.chat-topbar-row .progress {
  flex: 1;
  min-width: 0;
}

.chat-restart {
  appearance: none;
  background: transparent;
  border: 0;
  padding: var(--space-1) var(--space-2);
  min-height: 44px;
  font: inherit;
  font-size: 0.85rem;
  color: var(--ink);
  text-decoration: underline;
  cursor: pointer;
  white-space: nowrap;
}

.chat-end {
  height: 1px;
  width: 100%;
  flex-shrink: 0;
  pointer-events: none;
}

.chat-log {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  /* Clear the sticky dock so the last bubble isn’t trapped under confirm/composer */
  padding-bottom: 8px;
  /* Hard shadow offset — keeps right-aligned bubbles flush with the bar and dock */
  padding-right: 3px;
  flex: 1 0 auto;
  /* clip on x only: nothing can poke past the column edge; y stays visible so
     the sticky topbar and dock keep working */
  overflow-x: clip;
  overflow-y: visible;
}

.chat-log--rtl .msg-in {
  align-self: flex-end;
}

.chat-log--rtl .msg-out {
  align-self: flex-start;
}

.chat-dock {
  position: sticky;
  bottom: 0;
  z-index: 30;
  margin-top: auto;
  width: 100%;
  /* Shadow offset on the right so the composer lines up with the bubbles */
  padding-right: 3px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow-x: clip;
  overflow-y: visible;
  box-sizing: border-box;
  background: var(--paper);
  border-top: 2px solid var(--ink);
}

.chat-actions {
  position: static;
  left: auto;
  transform: none;
  bottom: auto;
  width: 100%;
  box-sizing: border-box;
  background: var(--paper);
  border-top: 0;
  padding: var(--space-3) 0;
  max-height: none;
  overflow: visible;
}

.chat-actions-chips {
  align-items: center;
}

/* Finish-deny / photo chips sit under the dock hairline — need air above */
.chat-dock > .chat-actions-chips {
  padding: var(--space-3) 0 var(--space-2);
}

.chat-actions-multi,
.chat-actions-finish {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--space-3) 0 var(--space-1);
  width: 100%;
}

/* Round check — fixed size so it never stretches into a green bar beside the mic */
.chat-app .btn-check-round {
  flex: 0 0 auto;
  width: var(--touch) !important;
  min-width: var(--touch);
  max-width: var(--touch);
  height: var(--touch) !important;
  min-height: var(--touch);
  padding: 0 !important;
  border-radius: 50%;
  border-width: 3px;
}

.chat-app .btn-check-round img {
  width: 28px;
  height: 28px;
}

.chat-app .chip-skip {
  /* legacy — skip is a normal .chip now */
}

.composer-skip-link {
  display: none !important;
}

/* Never let a send sit as a free sibling under .composer (chips + idle layout bug) */
.chat-app .composer > .rec-send {
  display: none !important;
}

/* Override global fixed composer — stays in the sticky dock as one column */
.chat-app .composer {
  position: static;
  left: auto;
  transform: none;
  bottom: auto;
  width: 100%;
  max-width: 100%;
  margin-top: 0;
  z-index: auto;
  border-top: 0;
  padding: var(--space-3) 0;
  padding-bottom: max(var(--space-3), env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.chat-app .composer-idle {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.chat-app .composer-idle .composer-input {
  min-width: 0;
}

.chat-app .composer-idle .rec-send {
  /* Only one idle send, inside the bar — never a free-floating sibling */
  flex-shrink: 0;
}

.chat-app .rec-wrap {
  width: 100%;
}

.chat-app .composer-input {
  background: #fff;
  min-height: 64px;
}

.chat-confirm-dock {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-3) 0 var(--space-1);
  background: var(--paper);
}

.photo-bubble {
  max-width: min(240px, 70vw);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: #fff;
}

.photo-bubble img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.msg-out .photo-bubble {
  align-self: flex-end;
}

.photo-hint {
  width: 100%;
  margin: 0 0 var(--space-2);
  font-size: 0.95rem;
  color: var(--ink);
}

.composer-attach {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.composer-attach:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.photo-preview-dock {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  padding-bottom: max(var(--space-3), env(safe-area-inset-bottom, 0px));
}

.photo-preview-img {
  width: min(280px, 100%);
  aspect-ratio: 1;
  object-fit: cover;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  align-self: center;
  background: #fff;
}

.photo-preview-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-3);
  width: 100%;
}

.photo-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 23, 18, 0.35);
  z-index: 40;
}

.photo-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: var(--paper);
  border-top: 2px solid var(--ink);
  padding: var(--space-2) var(--space-3) max(var(--space-3), env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 720px;
  margin: 0 auto;
  box-shadow: 0 -3px 0 var(--ink);
}

.photo-sheet-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 64px;
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  font: inherit;
  font-size: 1.1rem;
  color: var(--ink);
  cursor: pointer;
  text-align: start;
}

.photo-sheet-cancel {
  background: var(--paper);
  box-shadow: none;
  justify-content: center;
}

/* Desktop: wider column, more air — still one focused chat */
@media (min-width: 768px) {
  .chat-app {
    max-width: 680px;
    padding: 0 var(--space-5) var(--space-4);
    min-height: calc(100vh - 80px);
  }

  .chat-topbar {
    padding: var(--space-4) 0 var(--space-2);
  }

  .chat-log {
    gap: var(--space-4);
    padding-bottom: 8px;
  }

  .chat-actions {
    padding: var(--space-4) 0;
  }

  .msg {
    max-width: 80%;
  }

  .msg-reply {
    width: min(420px, 80%);
  }

  .bubble-text {
    padding: var(--space-3) var(--space-4);
  }
}

@media (min-width: 1100px) {
  .chat-app {
    max-width: 720px;
  }
}

.onboard:has(.composer) {
  padding-bottom: 0;
}

.onboard.chat-app:has(.composer) .footer-actions {
  display: none;
}

.progress {
  height: 8px;
  background: #ddd5c4;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: var(--space-3);
}

.chat-topbar .progress {
  margin-bottom: 0;
}

.progress > span {
  display: block;
  height: 100%;
  background: var(--green);
}

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.msg {
  max-width: 92%;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.msg-in {
  align-self: flex-start;
}

.msg-out {
  align-self: flex-end;
}

.msg-out .msg-text,
.bubble-text.bubble-out,
.msg-out .bubble-text {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  background: #eef8e6;
  box-shadow: var(--shadow);
  font-size: 1.15rem;
  margin: 0;
}

.bubble-text {
  margin: 0;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  font-size: 1.15rem;
  box-shadow: var(--shadow);
  max-width: 100%;
  word-break: break-word;
  line-height: 1.45;
  white-space: pre-line;
}

.bubble-text.bubble-in,
.msg-in .bubble-text {
  background: #fff;
  font-family: "Noto Naskh Arabic", "Archivo", sans-serif;
  unicode-bidi: isolate;
}

.msg-in .bubble-text.prompt-urdu {
  font-size: 1.2rem;
  text-align: right;
}

.msg-caption {
  display: none;
}

.msg-reply {
  gap: var(--space-2);
  width: min(340px, 92%);
}

.msg-confirm-row {
  /* Check/deny moved to sticky .chat-confirm-dock — never show in-thread controls */
  display: none !important;
}

.msg-confirm-row form {
  display: contents;
}

.btn-deny {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--touch);
  height: var(--touch);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.btn-deny img {
  width: var(--touch);
  height: var(--touch);
}

.btn-deny:active {
  transform: translate(2px, 2px);
}

.typing-bubble {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 12px 16px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.typing-bubble span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0.35;
  animation: typing-dot 1.2s ease-in-out infinite;
}

.typing-bubble span:nth-child(2) { animation-delay: 0.15s; }
.typing-bubble span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing-dot {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

.msg-text {
  margin: 0;
  font-size: 1.15rem;
}

.msg-caption {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted, #5c564c);
  line-height: 1.35;
}

.msg .voice-note {
  margin-top: 0;
  min-width: min(280px, 85vw);
}

.bubble {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
  background: #fffdf7;
  font-size: 1.15rem;
}

.prompt-urdu {
  font-size: 1.35rem;
  direction: rtl;
  unicode-bidi: isolate;
  text-align: right;
  font-family: "Noto Naskh Arabic", "Archivo", sans-serif;
}

.msg-caption.prompt-urdu {
  font-size: 0.95rem;
}

.chat-thread[data-lang="ur"],
.widget[data-lang="ur"] {
  direction: rtl;
  unicode-bidi: isolate;
}

.widget[data-lang="ur"] .listening {
  direction: rtl;
  unicode-bidi: isolate;
  text-align: right;
  font-family: "Noto Naskh Arabic", "Archivo", sans-serif;
}

.widget { margin-top: 0; }

.mic-chat {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: 100%;
}

.composer {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(480px, 100%);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  padding-bottom: max(var(--space-3), env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: 2px solid var(--ink);
  z-index: 30;
  box-sizing: border-box;
}

/* Legacy step widgets with fixed composer — chat-app uses .chat-app--dock-* instead */
.onboard:has(.composer):not(.chat-app) {
  padding-bottom: 120px;
}

.onboard:has(.composer) .footer-actions {
  display: none;
}

.composer-idle {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
}

.composer-idle[x-cloak],
.rec-wrap[x-cloak] {
  display: none !important;
}

.composer-input {
  flex: 1;
  min-height: var(--touch);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  font: inherit;
  font-size: 1.1rem;
  padding: 0 var(--space-3);
  box-shadow: var(--shadow);
}

.composer-input:focus {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.composer-mic {
  flex-shrink: 0;
  width: var(--touch);
  height: var(--touch);
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: var(--vermilion);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

.composer-mic:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.composer-mic img {
  width: 28px;
  height: 28px;
  pointer-events: none;
}

.composer form {
  display: contents;
}

.composer-skip-form {
  display: contents;
}

.composer .btn-skip {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  min-height: 48px;
}

/* WhatsApp-style record / review bar */
.rec-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
}

.rec-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--touch);
  padding: var(--space-2) var(--space-3);
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow);
  box-sizing: border-box;
  min-width: 0;
}

.rec-icon-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.rec-wave {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 3px;
  height: 28px;
  min-width: 48px;
}

.rec-wave span {
  display: block;
  width: 3px;
  height: 30%;
  border-radius: 2px;
  background: #9a9284;
}

.rec-wave span:nth-child(odd) { height: 45%; }
.rec-wave span:nth-child(3n) { height: 70%; }
.rec-wave span:nth-child(4n) { height: 35%; }

.rec-wave.live span {
  background: var(--green);
  animation: wave 0.85s ease-in-out infinite;
}

.rec-wave.live span:nth-child(2) { animation-delay: 0.08s; }
.rec-wave.live span:nth-child(3) { animation-delay: 0.16s; }
.rec-wave.live span:nth-child(4) { animation-delay: 0.04s; }
.rec-wave.live span:nth-child(5) { animation-delay: 0.2s; }
.rec-wave.live span:nth-child(6) { animation-delay: 0.12s; }
.rec-wave.live span:nth-child(7) { animation-delay: 0.18s; }
.rec-wave.live span:nth-child(8) { animation-delay: 0.06s; }

.rec-time {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.95rem;
  min-width: 2.5rem;
  color: var(--ink);
}

.rec-mic-live {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
}

.rec-send {
  flex-shrink: 0;
  width: var(--touch);
  height: var(--touch);
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: var(--green);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

.rec-send img {
  width: 26px;
  height: 26px;
  pointer-events: none;
}

.msg-pending {
  margin: 0;
  font-size: 0.95rem;
  color: #5c564c;
}

.msg-actions {
  align-self: flex-start;
  max-width: 100%;
}

.msg-actions .btn-check {
  margin: 0;
}

.voice-note-out {
  background: #eef8e6;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.chip, .icon-tile {
  min-height: var(--touch);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  font: inherit;
  font-weight: 600;
  padding: 0 var(--space-3);
  cursor: pointer;
  box-shadow: var(--shadow);
}

.chip.selected, .icon-tile.selected {
  background: var(--green);
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.icon-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3);
  min-height: 112px;
}

.icon-tile img {
  width: 56px;
  height: 56px;
}

.mic-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.mic-btn {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: var(--vermilion);
  color: var(--paper);
  font-size: 2rem;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.mic-btn.recording {
  background: var(--ink);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  50% { transform: scale(1.05); }
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}

.keypad button {
  min-height: var(--touch);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  font: inherit;
  font-size: 1.4rem;
  font-variant-numeric: tabular-nums;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.keypad-display {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  min-height: var(--touch);
  padding: var(--space-3);
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--space-2);
  background: #fff;
  direction: ltr;
  text-align: left;
}

.list-select {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-height: 50vh;
  overflow: auto;
}

.list-select button {
  min-height: var(--touch);
  text-align: start;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  font: inherit;
  padding: 0 var(--space-3);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.footer-actions {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--paper);
  border-top: 2px solid var(--ink);
  padding: var(--space-3);
  display: flex;
  gap: var(--space-2);
  justify-content: center;
}

.footer-actions .btn { flex: 1; max-width: 220px; }

/* Voice-note question player */
.voice-note {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--touch);
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow);
  cursor: pointer;
  user-select: none;
}

.voice-note-play {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.voice-note-wave {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 28px;
}

.voice-note-wave span {
  display: block;
  width: 4px;
  height: 40%;
  border-radius: 2px;
  background: var(--ink);
  opacity: 0.55;
}

.voice-note-wave span:nth-child(1) { height: 35%; }
.voice-note-wave span:nth-child(2) { height: 70%; }
.voice-note-wave span:nth-child(3) { height: 45%; }
.voice-note-wave span:nth-child(4) { height: 90%; }
.voice-note-wave span:nth-child(5) { height: 55%; }
.voice-note-wave span:nth-child(6) { height: 75%; }

.voice-note-wave.playing span {
  animation: wave 0.9s ease-in-out infinite;
  opacity: 1;
  background: var(--vermilion);
}

.voice-note-wave.playing span:nth-child(2) { animation-delay: 0.1s; }
.voice-note-wave.playing span:nth-child(3) { animation-delay: 0.2s; }
.voice-note-wave.playing span:nth-child(4) { animation-delay: 0.15s; }
.voice-note-wave.playing span:nth-child(5) { animation-delay: 0.25s; }
.voice-note-wave.playing span:nth-child(6) { animation-delay: 0.05s; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.55); }
  50% { transform: scaleY(1.15); }
}

.voice-note-time {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.95rem;
  min-width: 2.5rem;
  text-align: end;
  color: var(--muted);
}

/* Icon next / skip */
.btn-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--touch);
  width: 100%;
  padding: var(--space-2);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--green);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.btn-check img {
  width: 48px;
  height: 48px;
}

.btn-check:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-check:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.btn-skip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch);
  min-width: var(--touch);
  padding: var(--space-2);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.btn-skip img {
  width: 40px;
  height: 40px;
}

.btn-skip:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.keypad button.key-ok {
  background: var(--green);
  font-weight: 700;
}

.mic-status-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--paper);
}

.mic-status-icon.ok {
  background: var(--green);
}

.mic-status-icon.busy {
  background: var(--vermilion);
  animation: pulse 1s infinite;
}

.fix-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.fix-chip {
  min-height: 44px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: #fff;
  padding: 0 var(--space-3);
  font: inherit;
  font-weight: 600;
  box-shadow: var(--shadow);
  cursor: pointer;
}

/* Search */
.filters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.filters label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
}

.filters select, .filters input, .form input, .form select, .form textarea {
  min-height: 44px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 0 var(--space-2);
  font: inherit;
  background: #fff;
}

.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 420px;
}

.form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 600;
}

.form .hint {
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--muted);
}

.results {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.search-results-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.search-pagination-top {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.page-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-height: 36px;
  min-width: 36px;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  box-shadow: 2px 2px 0 var(--ink);
}

.page-arrow:active:not(.is-disabled) {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--ink);
}

.page-arrow.is-disabled {
  opacity: 0.35;
  pointer-events: none;
  box-shadow: none;
}

.page-arrow-status {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  min-width: 2.5rem;
  text-align: center;
}

.search-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 2px solid var(--ink);
}

.search-pagination .btn {
  min-height: 44px;
  text-decoration: none;
}

.search-pagination-status {
  font-weight: 600;
  color: var(--muted);
}

.result {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: var(--space-3);
  align-items: center;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: var(--space-3);
  background: #fffdf7;
}

.result img.avatar {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 2px solid var(--ink);
  background: #ddd;
}

.badge-fresh { color: var(--green); font-weight: 700; font-size: 0.85rem; }
.badge-check { color: var(--gold); font-weight: 700; font-size: 0.85rem; }
.badge-flag { color: var(--vermilion); font-weight: 700; font-size: 0.85rem; }

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-3) 0;
}

.admin-nav a {
  padding: 8px 12px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  text-decoration: none;
  background: #fff;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-3);
}

.stat {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: var(--space-3);
  background: #fff;
}

.stat .num { font-size: 1.75rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.listening {
  color: var(--muted);
  font-size: 0.95rem;
  min-height: 1.4em;
}

.urdu-svg { display: inline-block; max-width: 100%; height: auto; vertical-align: middle; }

.nav-link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.register-modal {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--paper);
  color: var(--ink);
  padding: 0;
  max-width: min(420px, calc(100vw - 2rem));
}

.register-modal::backdrop {
  background: rgba(26, 23, 18, 0.45);
}

.register-modal-inner {
  margin: 0;
  padding: var(--space-4);
}
