/* Typeform Erstanamnese wizard — Dr. Lang gold + navy, senior-friendly PWA shell */

html:has(.wizard-body),
body.wizard-body {
  height: 100%;
  min-height: 100dvh;
  overflow: hidden;
}

.wizard-body {
  font-size: 1.05rem;
  display: block;
  background: var(--bg);
}

.wizard-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100dvh;
  max-height: 100dvh;
  background: linear-gradient(165deg, var(--bg-warm) 0%, var(--bg) 45%, #f1f5f9 100%);
}

.wizard-header {
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 120;
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(14, 39, 69, 0.06);
}

.wizard-main {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

.wizard-footer {
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 120;
  min-height: auto;
  padding: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -1px 0 rgba(14, 39, 69, 0.06);
}

.wizard-footer-nav {
  max-width: 480px;
  margin: 0 auto;
  padding: 8px 12px;
  border-top: none;
}

.wizard-header .brand {
  padding: 0.75rem 1rem 0.5rem;
  max-width: 480px;
}

.wizard-header h1 {
  color: var(--navy);
  font-size: 1.1rem;
}

.wizard-header .subtitle {
  font-size: 0.82rem;
}

.wizard-header .brand-logo {
  height: 34px;
  max-width: 108px;
}

.progress-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 1rem 0.75rem;
}

.progress-label {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--navy);
  font-weight: 500;
}

.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-hover));
  border-radius: 999px;
  transition: width 0.35s ease;
}

.wizard-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 1rem 1rem 1.25rem;
  flex: none;
  justify-content: flex-start;
}

.wizard-card {
  min-height: 280px;
}

.wizard-step-card {
  display: flex;
  flex-direction: column;
}

.wizard-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.wizard-question {
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  color: var(--navy);
}

.wizard-subtitle {
  margin: -0.5rem 0 0;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.45;
}

.wizard-multi-enum-text {
  margin-top: 1rem;
}

.wizard-multi-enum-text .wizard-textarea {
  width: 100%;
  box-sizing: border-box;
}

.wizard-hint-box {
  background: var(--gold-soft);
  border: 1px solid #e8d9a8;
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--navy);
}

.wizard-hint-text {
  margin: 0;
}

.wizard-intro-emergency {
  margin: 0.85rem 0 0;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: var(--emergency);
  border: 1px solid #fecaca;
  color: var(--emergency-text);
  font-size: 1.05rem;
  line-height: 1.45;
}

.wizard-hint-positive {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
}

.wizard-hint-positive p {
  margin: 0;
}

.wizard-hint-icons {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.wizard-hint-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  font-size: 1.25rem;
  background: var(--gold-soft);
  border: 1px solid #e8d9a8;
  border-radius: 10px;
}

.wizard-tier-intro {
  margin: 0;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.45;
}

.consent-privacy {
  margin: 0.5rem 0 0;
  text-align: center;
}

.consent-privacy-link {
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent-privacy-link:hover {
  color: var(--navy);
}

/* Primary CTAs — navy corporate identity (gold = accents only); PIN/consent/done only */
.wizard-body .btn.primary {
  background: var(--navy);
  color: #fff;
  border: 2px solid var(--navy);
}

.wizard-body .btn.primary:hover,
.wizard-body .btn.primary:focus {
  background: var(--navy-dark);
  border-color: var(--navy-dark);
  color: #fff;
}

/* Footer Weiter / Fertig — never used on Ja/Nein choice buttons */
.wizard-body .wizard-nav-primary {
  background: var(--navy);
  color: #fff;
  border: 2px solid var(--navy);
}

.wizard-body .wizard-nav-primary:hover,
.wizard-body .wizard-nav-primary:focus {
  background: var(--navy-dark);
  border-color: var(--navy-dark);
  color: #fff;
}

.wizard-body .wizard-btn-card:not(.wizard-btn-choice):not(.wizard-tier-card):not(.btn.secondary):not(.upload-cat-btn):not(:disabled) {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.wizard-body .wizard-btn-card:not(.wizard-btn-choice):not(.wizard-tier-card):not(.btn.secondary):not(.upload-cat-btn):not(:disabled):hover,
.wizard-body .wizard-btn-card:not(.wizard-btn-choice):not(.wizard-tier-card):not(.btn.secondary):not(.upload-cat-btn):not(:disabled):focus {
  background: var(--navy-dark);
  border-color: var(--navy-dark);
}

/* Tier cards (step 4) — white framed, dark text; gold accent when selected */
.wizard-body .wizard-tier-card:not(:disabled) {
  background: #fff;
  color: var(--navy);
  border: 2px solid var(--navy);
}

.wizard-body .wizard-tier-card:not(:disabled):hover,
.wizard-body .wizard-tier-card:not(:disabled):focus {
  border-color: var(--navy-dark);
  background: var(--gold-soft);
  color: var(--navy);
}

.wizard-body .wizard-tier-card .tier-card-label {
  color: var(--navy);
}

.wizard-body .wizard-tier-card .tier-card-sub {
  color: var(--muted);
}

.wizard-body .wizard-tier-card.recommended {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
  background: #fff;
}

.wizard-body .wizard-tier-card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold);
  background: var(--gold-soft);
}

.wizard-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: auto;
}

.wizard-actions-centered {
  align-items: center;
  width: 100%;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.wizard-actions-centered > .wizard-btn-choice,
.wizard-actions-centered > .wizard-tier-card {
  width: 100%;
  max-width: 300px;
}

.wizard-actions-centered > .wizard-tier-card {
  align-items: center;
  text-align: center;
}

.wizard-actions-centered .tier-card-title {
  justify-content: center;
}

.wizard-btn {
  min-height: 52px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 14px;
  padding: 0.85rem 1.25rem;
}

.wizard-btn-card {
  text-align: left;
  background: var(--card);
  border: 2px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Neutral choice buttons — white card until user taps; no primary/secondary on render */
.wizard-btn-choice,
.boolean-actions .btn {
  background: #fff !important;
  color: var(--navy);
  border: 2px solid var(--navy);
  text-align: center;
  justify-content: center;
}

.wizard-body .wizard-btn-choice {
  text-align: center;
  justify-content: center;
}

.wizard-body .wizard-btn-choice:hover,
.wizard-body .wizard-btn-choice:focus,
.boolean-actions .btn:hover,
.boolean-actions .btn:focus {
  border-color: var(--navy-dark);
  background: var(--gold-soft) !important;
  color: var(--navy-dark);
}

.wizard-btn-card.btn.secondary:hover,
.wizard-btn-card.btn.secondary:focus,
.wizard-btn-card.upload-cat-btn:hover,
.wizard-btn-card.upload-cat-btn:focus {
  border-color: var(--navy);
  background: var(--gold-soft);
}

.wizard-btn-card.recommended {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}

/* Smoking enum — Ja/Nein row, former option below */
.smoking-enum-row {
  display: flex;
  gap: 0.75rem;
  width: 100%;
}

.smoking-enum-row .btn {
  flex: 1 1 0;
}

.smoking-enum-former {
  width: 100%;
  max-width: 300px;
  margin-top: 0.25rem;
}

.wizard-tier-card {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  min-height: auto;
}

.tier-card-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
}

.tier-card-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--navy);
}

.tier-card-star {
  color: var(--gold);
  font-size: 1rem;
  line-height: 1;
}

.tier-card-sub {
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.35;
}

.wizard-btn-card .tier-badge {
  margin-left: auto;
  font-size: 0.8rem;
  background: var(--navy);
  color: #fff;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.wizard-btn-card:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.wizard-input,
.wizard-textarea {
  width: 100%;
  font-size: 1.15rem;
  padding: 0.9rem 1rem;
  border: 2px solid var(--border);
  border-radius: 14px;
  min-height: 52px;
}

.wizard-input:focus,
.wizard-textarea:focus {
  outline: 2px solid var(--navy);
  outline-offset: 1px;
  border-color: var(--navy);
}

.wizard-textarea {
  min-height: 120px;
  resize: vertical;
}

.wizard-dual-number {
  display: grid;
  gap: 1rem;
}

.wizard-dual-number label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.wizard-bp-with-pulse {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.wizard-bp-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.wizard-bp-field label,
.wizard-bp-pulse label {
  display: block;
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.wizard-input-lg {
  font-size: 1.35rem;
  padding: 0.85rem 1rem;
  min-height: 3.25rem;
}

.wizard-bp-pulse {
  margin-top: 0.25rem;
}

@media (max-width: 420px) {
  .wizard-bp-row {
    grid-template-columns: 1fr;
  }
}

/* Fixed footer navigation — Zurück / Weiter */
.wizard-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.wizard-footer-spacer {
  flex: 1;
  min-width: 0.25rem;
}

.wizard-bottom-actions {
  display: flex;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
}

.wizard-back {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 44px;
  max-height: 44px;
  padding: 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  border: 2px solid var(--navy);
  background: #fff;
  color: var(--navy);
  cursor: pointer;
}

.wizard-back:hover,
.wizard-back:focus {
  background: var(--gold-soft);
  border-color: var(--navy-dark);
  color: var(--navy-dark);
}

.wizard-bottom-bar .wizard-nav-primary {
  min-height: 44px;
  max-height: 44px;
  min-width: 6.5rem;
  padding: 0 0.85rem;
  font-size: 0.95rem;
  border-radius: 10px;
}

.wizard-bottom-bar .wizard-nav-primary.disabled,
.wizard-bottom-bar .wizard-nav-primary:disabled {
  opacity: 0.45;
  background: var(--muted);
  border-color: var(--muted);
  color: #fff;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

.wizard-back.recording-blocked {
  opacity: 0.55;
}

.wizard-recording-hint {
  margin: 0;
  padding: 0.65rem 0.85rem;
  background: var(--gold-soft);
  border: 1px solid #e8d9a8;
  border-radius: 12px;
  color: var(--navy);
  font-size: 0.95rem;
  line-height: 1.4;
  text-align: center;
}

.voice-recording-hint {
  width: 100%;
}

/* Center choice buttons (Ja/Nein, enum cards, gender) */
.wizard-actions-center {
  align-items: center;
}

.wizard-actions-center .wizard-btn-card,
.wizard-actions-center > .btn {
  width: 100%;
  max-width: 300px;
}

/* Voice input — WhatsApp-style: hint, text, pill/panel slot, mic below */
.voice-input-stack {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
}

.voice-compose-box {
  display: flex;
  flex-direction: column;
  padding: 0.3rem 0.5rem;
  background: #fff;
  border: 1px solid #e8e0d5;
  border-radius: 12px;
}

.voice-compose-input {
  width: 100%;
  min-height: 1.8rem;
  max-height: 3.6rem;
  overflow-y: auto;
  resize: none;
  padding: 0.2rem 0.1rem;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--navy, #0e2745);
  font-size: 0.9rem;
  line-height: 1.4;
  box-shadow: none;
}

.voice-compose-input:focus {
  outline: none;
}

.voice-compose-input::placeholder {
  color: var(--muted, #8a97a8);
}

.voice-pills-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
}

.voice-pills-wrap:empty {
  display: none;
}

.voice-input-stack .voice-audio-preview[hidden],
.voice-input-stack .voice-recording-panel[hidden] {
  display: none !important;
}

/* WhatsApp voice message bubble — green only after recording */
.voice-audio-preview {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  max-width: 100%;
  padding: 0.45rem 0.6rem 0.45rem 0.5rem;
  background: transparent;
  border: none;
  border-radius: 18px 18px 18px 4px;
}

.voice-input-stack .voice-recording-panel {
  margin: 0;
  width: 100%;
}

.voice-input-stack .voice-audio-preview.is-recorded,
.voice-input-stack .voice-message-bubble.is-recorded {
  margin: 0;
  width: 100%;
  background: #dcf8c6;
  border: 1px solid #b8e0a4;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.voice-audio-play {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(37, 211, 102, 0.35);
  transition: transform 0.15s ease;
}

.voice-audio-play:hover,
.voice-audio-play:focus {
  transform: scale(1.05);
}

.voice-audio-play.playing {
  background: #128c7e;
}

.voice-play-icon {
  width: 16px;
  height: 16px;
}

.voice-audio-track {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.voice-audio-bars {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
  height: 28px;
  overflow: hidden;
}

.voice-audio-bar {
  display: block;
  width: 2px;
  min-height: 4px;
  border-radius: 2px;
  background: #128c7e;
  opacity: 0.55;
  transition: opacity 0.2s ease;
}

.voice-audio-bars.playing .voice-audio-bar {
  animation: voice-bar-pulse 0.9s ease-in-out infinite alternate;
  opacity: 0.85;
}

.voice-audio-bars.playing .voice-audio-bar:nth-child(odd) {
  animation-delay: 0.15s;
}

@keyframes voice-bar-pulse {
  from { opacity: 0.45; transform: scaleY(0.85); }
  to { opacity: 1; transform: scaleY(1.1); }
}

.voice-audio-duration {
  flex-shrink: 0;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  color: #3b4a3b;
  min-width: 2.5rem;
  text-align: right;
}

.voice-delete-icon {
  width: 20px;
  height: 20px;
}

.voice-audio-delete {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.voice-audio-delete:hover,
.voice-audio-delete:focus {
  color: #b91c1c;
  background: rgba(185, 28, 28, 0.1);
}

/* Active recording panel — WhatsApp green tint */
.voice-recording-panel {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  background: #dcf8c6;
  border: 1px solid #b8e0a4;
  border-radius: 18px 18px 18px 4px;
}

.voice-recording-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.voice-recording-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #047857;
  animation: pulse-rec 1.2s infinite;
}

.voice-recording-timer {
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  color: #1f3d2a;
  font-weight: 600;
}

.voice-recording-panel .voice-waveform-wrap {
  flex: 1;
  min-width: 0;
  max-width: none;
  width: 100%;
  padding: 0.35rem 0.5rem;
  background: transparent;
  border-radius: 8px;
}

.voice-recording-panel .voice-waveform {
  display: block;
  width: 100%;
  height: 36px;
}

.voice-mic-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 3rem;
  padding: 0.15rem 0.1rem 0;
}

.voice-mic-label {
  flex: 1;
  min-width: 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--navy, #0e2745);
  letter-spacing: 0.01em;
}

.voice-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.voice-record-primary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 4rem;
  height: 4rem;
  min-width: 4rem;
  min-height: 4rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--call-green), #047857);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.voice-mic-compact {
  width: 3rem;
  height: 3rem;
  min-width: 3rem;
  min-height: 3rem;
}

.voice-mic-compact .voice-mic-icon {
  width: 22px;
  height: 22px;
}

.voice-record-primary:hover,
.voice-record-primary:focus {
  transform: scale(1.04);
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.4);
}

.voice-record-primary.recording {
  background: linear-gradient(145deg, #047857, #065f46);
  animation: pulse-rec 1.2s infinite;
}

.voice-record-primary:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.voice-mic-icon {
  width: 26px;
  height: 26px;
}

.voice-record-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.voice-record-primary.recording .voice-wave {
  animation: voice-wave-pulse 0.8s ease-in-out infinite alternate;
}

.voice-record-primary.recording .voice-wave-2 {
  animation-delay: 0.4s;
}

@keyframes voice-wave-pulse {
  from { opacity: 0.35; transform: scaleX(0.85); }
  to { opacity: 1; transform: scaleX(1.1); }
}

.voice-mic-row .voice-waveform-wrap {
  flex: 1;
  min-width: 0;
  max-width: none;
  width: auto;
  padding: 0.4rem 0.65rem;
  background: var(--assistant);
  border-radius: 12px;
}

.voice-mic-row .voice-waveform {
  display: block;
  width: 100%;
  height: 36px;
}

/* legacy patient transcript box — unused; STT must not appear in patient UI */
.voice-transcript-box {
  width: 100%;
  max-height: 120px;
  overflow-y: auto;
  padding: 0.65rem 0.85rem;
  background: var(--assistant);
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--text);
  -webkit-overflow-scrolling: touch;
}

.voice-record-btn.recording {
  background: linear-gradient(145deg, #047857, #065f46);
}

@keyframes pulse-rec {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.88; transform: scale(1.03); }
}

.wizard-body .wizard-btn-choice.is-selected,
.boolean-actions .btn.is-selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold);
  background: var(--gold-soft) !important;
  color: var(--navy);
}

/* Prevent accidental navy fill if primary class leaks onto choice buttons */
.wizard-body .wizard-btn-choice.btn.primary,
.boolean-actions .btn.primary {
  background: #fff !important;
  color: var(--navy);
  border: 2px solid var(--navy);
}

/* File upload — compact cards */
.upload-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  width: 100%;
}

.upload-card-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.upload-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  min-height: 88px;
  padding: 0.75rem 0.55rem;
  border: 2px solid var(--navy);
  border-radius: 14px;
  background: var(--card);
  color: var(--navy);
  cursor: pointer;
  text-align: center;
  transition: background 0.15s ease, border-color 0.15s ease;
  font: inherit;
}

.upload-card-static {
  cursor: default;
  min-height: auto;
  padding: 0.55rem 0.45rem;
  pointer-events: none;
}

.upload-card-static:hover,
.upload-card-static:focus {
  background: var(--card);
  border-color: var(--navy);
}

.upload-card:hover,
.upload-card:focus {
  background: var(--gold-soft);
  border-color: var(--gold);
  outline: none;
}

.upload-card-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.upload-card-label {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
}

.upload-add-btn {
  width: 100%;
  min-height: 44px;
  font-size: 0.9rem;
  font-weight: 600;
}

.upload-file-list-compact {
  margin-top: 0;
}

.upload-file-list-compact li {
  padding: 0.4rem 0.5rem;
  font-size: 0.82rem;
  min-width: 0;
}

.upload-thumb {
  flex-shrink: 0;
  font-size: 0.95rem;
}

.upload-file-name {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-medplan-summary {
  padding: 0.75rem 0.85rem;
  background: var(--gold-soft);
  border: 1px solid #e8d9a8;
  border-radius: 12px;
  font-size: 0.95rem;
  color: var(--navy);
  line-height: 1.4;
}

.upload-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(14, 39, 69, 0.55);
}

.upload-modal {
  width: 100%;
  max-width: 360px;
  padding: 1.1rem;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(14, 39, 69, 0.25);
}

.upload-modal h3 {
  margin: 0 0 0.65rem;
  font-size: 1.2rem;
  color: var(--navy);
}

.upload-modal-hint {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.4;
}

.upload-modal-compact {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.upload-medplan-choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.upload-medplan-choice-btn {
  min-height: 48px;
  font-size: 1rem;
  font-weight: 700;
}

.upload-medplan-scan-link {
  align-self: center;
  padding: 0.35rem 0.5rem;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.upload-medplan-scan-link:hover,
.upload-medplan-scan-link:focus {
  color: var(--navy);
  outline: none;
}

.upload-modal-btn {
  width: 100%;
  min-height: 52px;
}

.upload-scan-video {
  width: 100%;
  max-height: 240px;
  border-radius: 12px;
  background: #000;
  object-fit: cover;
}

.upload-modal-status {
  margin: 0.65rem 0;
  font-size: 0.95rem;
  color: var(--navy);
  text-align: center;
}

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  background: #fafafa;
}

.upload-category-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.upload-cat-btn {
  min-height: 56px;
  font-size: 1.05rem;
}

.upload-cat-btn.active {
  border-color: var(--navy);
  background: var(--gold-soft);
}

.upload-file-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.upload-file-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  background: var(--assistant);
  border-radius: 10px;
  font-size: 0.95rem;
}

.upload-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.upload-actions-row .wizard-btn {
  min-height: 56px;
}

@media (min-width: 480px) {
  .upload-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }
}

@media (min-width: 720px) {
  .upload-cards-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Creatinine slider — gold + navy, senior-friendly */
.wizard-slider-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 0.5rem 0 0.25rem;
  width: 100%;
}

.wizard-slider-value {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.02em;
  min-height: 2.75rem;
  line-height: 1.2;
}

.wizard-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  max-width: 360px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--gold) 100%);
  outline: none;
  cursor: pointer;
  touch-action: pan-x;
}

.wizard-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--navy);
  box-shadow: 0 2px 8px rgba(14, 39, 69, 0.35);
  cursor: grab;
}

.wizard-slider::-moz-range-thumb {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--navy);
  box-shadow: 0 2px 8px rgba(14, 39, 69, 0.35);
  cursor: grab;
}

.wizard-slider:focus {
  outline: 2px solid var(--navy);
  outline-offset: 4px;
}

.wizard-slider-unknown {
  width: 100%;
  max-width: 360px;
  min-height: 52px;
}

/* Birth year stepper — single row: − [year input] +, always visible */
.wizard-year-stepper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.5rem 0 0.25rem;
}

.wizard-year-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 360px;
}

.wizard-year-btn {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid var(--navy);
  background: var(--gold);
  color: var(--navy);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

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

.wizard-year-input {
  flex: 1 1 auto;
  min-width: 5.5rem;
  max-width: 180px;
  min-height: 64px;
  padding: 0.25rem 0.5rem;
  border: 3px solid var(--navy);
  border-radius: 12px;
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--navy);
  background: #fff;
  touch-action: manipulation;
  -webkit-appearance: none;
  appearance: none;
  -moz-appearance: textfield;
}

.wizard-year-input::-webkit-outer-spin-button,
.wizard-year-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.wizard-year-input:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.wizard-year-range-hint {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted, #5a6776);
  text-align: center;
}

/* Completion screen — PDF download + finish */
.done-card {
  text-align: center;
}

.done-card h2 {
  color: var(--navy);
  font-size: 1.65rem;
  margin-bottom: 0.75rem;
}

.done-privacy {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 1rem 0 1.25rem;
  line-height: 1.5;
}

.done-actions {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.done-btn-pdf,
.done-btn-finish {
  width: 100%;
  min-height: 58px;
  font-size: 1.1rem;
  font-weight: 600;
}

.done-btn-pdf {
  background: var(--gold);
  color: var(--navy);
  border: 2px solid var(--navy);
}

.done-btn-pdf:hover,
.done-btn-finish:hover {
  transform: translateY(-1px);
}

@media (min-width: 480px) {
  .done-actions {
    flex-direction: row;
    justify-content: center;
  }

  .done-btn-pdf,
  .done-btn-finish {
    flex: 1;
    max-width: 280px;
  }
}

.done-optional-note {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(14, 39, 69, 0.12);
  text-align: left;
}

.done-optional-prompt {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--muted, #5a6776);
  line-height: 1.5;
}

.done-optional-note .voice-input-stack {
  text-align: left;
}

/* ── Nuclear: choice buttons white until user taps (all tiers/steps) ─── */
.wizard-main .wizard-btn-choice,
.wizard-main .boolean-actions button,
.wizard-main .wizard-actions-centered > .wizard-btn-choice,
.wizard-main .wizard-actions .wizard-btn-choice {
  background: #fff !important;
  color: var(--navy) !important;
  border: 2px solid var(--navy) !important;
}

.wizard-main .wizard-btn-choice:hover,
.wizard-main .wizard-btn-choice:focus,
.wizard-main .boolean-actions button:hover,
.wizard-main .boolean-actions button:focus {
  background: var(--gold-soft) !important;
  border-color: var(--navy-dark) !important;
  color: var(--navy-dark) !important;
}

.wizard-main .wizard-btn-choice.btn.primary,
.wizard-main .wizard-btn-choice.wizard-nav-primary,
.wizard-main .boolean-actions .btn.primary,
.wizard-main .boolean-actions button.primary {
  background: #fff !important;
  color: var(--navy) !important;
  border: 2px solid var(--navy) !important;
}

.wizard-main .wizard-btn-choice.is-selected,
.wizard-main .boolean-actions .is-selected {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 2px var(--gold);
  background: var(--gold-soft) !important;
  color: var(--navy) !important;
}

/* ── Shell v2 — Nelly-style flow + Herzpraxis split branding (2026-06-28) ── */

.wizard-body {
  font-family: "DM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-weight: 450;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hp-shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  max-height: 100dvh;
  height: 100%;
}

.hp-brand-panel {
  display: none;
}

.hp-flow-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
  background: #fff;
}

.hp-flow-header {
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 120;
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hp-flow-header-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  max-width: 560px;
  margin: 0 auto;
  padding: 0.85rem 1rem 0.5rem;
}

.hp-flow-logo {
  height: 28px;
  width: auto;
  max-width: 88px;
  object-fit: contain;
}

.hp-flow-practice {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
}

.flow-greeting {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 1rem 0.65rem;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--navy);
}

.hp-progress {
  max-width: 560px;
}

.hp-flow-main {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  background: #fff;
}

.hp-step-stage {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 1rem 1rem 1.5rem;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.hp-phase-flow .hp-step-stage,
.hp-phase-done .hp-step-stage {
  justify-content: center;
}

.hp-auth-step.card {
  box-shadow: 0 8px 32px rgba(14, 39, 69, 0.08);
  border: 1px solid var(--border);
}

.hp-pin-input {
  font-size: 1.5rem !important;
  letter-spacing: 0.35em;
  text-align: center;
  font-weight: 600;
}

.hp-flow-step {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: min(420px, 70dvh);
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

/* flex display overrides [hidden] — keep inactive flow/auth screens off-screen */
.hp-step-stage > .hp-auth-step[hidden],
.hp-step-stage > .hp-flow-step[hidden] {
  display: none !important;
}

.hp-flow-step .wizard-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hp-phase-flow .wizard-question {
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.hp-phase-flow .wizard-subtitle {
  text-align: center;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

.hp-phase-auth .hp-flow-header-brand {
  display: flex;
}

.hp-phase-flow .hp-flow-header-brand,
.hp-phase-done .hp-flow-header-brand {
  padding-bottom: 0.25rem;
}

.hp-phase-flow .hp-flow-practice,
.hp-phase-done .hp-flow-practice {
  display: none;
}

.hp-flow-footer {
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 120;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.hp-flow-footer .wizard-footer-nav {
  max-width: 560px;
}

/* Step enter animation */
.hp-step-enter {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.hp-step-enter.hp-step-enter-active {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .hp-step-enter {
    transition: none;
    opacity: 1;
    transform: none;
  }
}

/* Loading overlay */
.hp-loading {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.hp-loading[hidden] {
  display: none !important;
}

.hp-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.hp-spinner {
  width: 28px;
  height: 28px;
  border: 2.5px solid var(--border);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: hp-spin 0.85s linear infinite;
}

@keyframes hp-spin {
  to { transform: rotate(360deg); }
}

.hp-loading-text {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--navy);
}

/* Segment toggle (Ja/Nein) */
.hp-segment-wrap {
  align-items: center !important;
}

.hp-segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  width: 100%;
  max-width: 320px;
  padding: 4px;
  border-radius: 14px;
  border: 2px solid var(--navy);
  background: #fff;
  overflow: hidden;
}

.hp-segment-btn {
  min-height: 52px;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.hp-segment-btn:hover,
.hp-segment-btn:focus-visible {
  background: var(--gold-soft);
  outline: none;
}

.hp-segment-btn.is-selected {
  background: var(--navy);
  color: #fff;
}

.hp-segment-btn.is-selected:hover,
.hp-segment-btn.is-selected:focus-visible {
  background: var(--navy-dark);
  color: #fff;
}

/* Done screen */
.hp-done-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--gold);
}

.hp-phase-done .done-card h2 {
  text-align: center;
  font-size: 1.5rem;
}

.hp-phase-done #done-message {
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--muted);
}

/* Desktop split — branding panel + flow */
@media (min-width: 768px) {
  .hp-shell {
    flex-direction: row;
    max-height: 100dvh;
  }

  .hp-brand-panel {
    display: flex;
    flex: 0 0 min(42vw, 420px);
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    background: linear-gradient(165deg, var(--navy-dark) 0%, var(--navy) 55%, #123456 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
  }

  .hp-brand-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 80%, rgba(201, 162, 75, 0.12) 0%, transparent 55%);
    pointer-events: none;
  }

  .hp-brand-inner {
    position: relative;
    z-index: 1;
    max-width: 320px;
  }

  .hp-brand-logo {
    height: auto;
    width: min(180px, 100%);
    margin-bottom: 1.5rem;
  }

  .hp-brand-kicker {
    margin: 0 0 0.35rem;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
  }

  .hp-brand-title {
    margin: 0;
    font-size: clamp(1.5rem, 2.2vw, 1.85rem);
    font-weight: 600;
    line-height: 1.25;
    color: #fff;
  }

  .hp-brand-rule {
    width: 48px;
    height: 3px;
    margin: 1.25rem 0 1.5rem;
    border-radius: 999px;
    background: var(--gold);
  }

  .hp-brand-trust {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
  }

  .hp-brand-trust li {
    position: relative;
    padding-left: 1.15rem;
    font-size: 0.98rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.88);
  }

  .hp-brand-trust li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
  }

  .hp-flow-panel {
    flex: 1;
  }

  .hp-phase-auth .hp-flow-header-brand {
    display: none;
  }

  .hp-step-stage {
    padding: 2rem 2.5rem 2rem;
  }

  .hp-auth-step.card {
    padding: 2rem 2.25rem;
  }
}

@media (min-width: 1100px) {
  .hp-brand-panel {
    flex-basis: 440px;
  }

  .hp-step-stage {
    max-width: 600px;
  }

  .hp-flow-footer .wizard-footer-nav,
  .hp-progress,
  .hp-flow-header-brand {
    max-width: 600px;
  }
}

/* Auth → flow screen crossfade (no full-page reload overlay) */
.hp-auth-step,
.hp-flow-step {
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.hp-auth-step.hp-screen-leaving,
.hp-flow-step.hp-screen-leaving {
  opacity: 0;
  transform: translateX(-14px);
  pointer-events: none;
  position: absolute;
  left: 1rem;
  right: 1rem;
  top: 1rem;
  z-index: 1;
}

.hp-auth-step.hp-screen-entering,
.hp-flow-step.hp-screen-entering {
  opacity: 0;
  transform: translateX(14px);
}

.hp-auth-step.hp-screen-entering-active,
.hp-flow-step.hp-screen-entering-active {
  opacity: 1;
  transform: translateX(0);
}

.hp-auth-pending .hp-auth-step:not(.hp-screen-leaving) {
  opacity: 0.92;
}

.hp-btn-pending {
  cursor: wait;
  opacity: 0.85;
}

.hp-progress {
  transition: opacity 0.25s ease, max-height 0.3s ease;
}

.hp-phase-auth .hp-progress[hidden] {
  display: none !important;
}

.hp-phase-flow .hp-progress:not([hidden]) {
  animation: hp-progress-in 0.28s ease;
}

@keyframes hp-progress-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hp-auth-step,
  .hp-flow-step {
    transition: none;
  }

  .hp-auth-step.hp-screen-leaving,
  .hp-flow-step.hp-screen-leaving,
  .hp-auth-step.hp-screen-entering,
  .hp-flow-step.hp-screen-entering {
    transform: none;
    opacity: 1;
    position: static;
  }

  .hp-phase-flow .hp-progress:not([hidden]) {
    animation: none;
  }
}

/* ── Standalone SMS login page (/patient/login.html) ── */

html:has(.hp-login-page) {
  overflow: auto;
}

body.hp-login-page {
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100dvh;
  font-size: 1.0625rem;
  line-height: 1.55;
}

.hp-shell-login {
  min-height: 100dvh;
  max-height: none;
  height: auto;
  background: linear-gradient(165deg, var(--bg-warm) 0%, var(--bg) 45%, #f1f5f9 100%);
}

.hp-login-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding:
    calc(env(safe-area-inset-top, 0px) + 2.25rem)
    max(1.25rem, env(safe-area-inset-right, 0px))
    calc(env(safe-area-inset-bottom, 0px) + 2rem)
    max(1.25rem, env(safe-area-inset-left, 0px));
}

.hp-login-header {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 0 1.75rem;
  padding: 0;
}

.hp-login-logo {
  display: block;
  height: auto;
  width: auto;
  max-width: min(200px, 72vw);
  max-height: 56px;
  object-fit: contain;
}

.hp-login-body {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hp-login-panel {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(14, 39, 69, 0.08);
  padding: 1.75rem 1.375rem;
}

.hp-login-title {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.hp-login-lead {
  margin: 0 0 1.5rem;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--muted);
}

.hp-login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.hp-login-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.hp-login-label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--navy);
}

.hp-login-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  font-size: 1.0625rem;
  min-height: 54px;
}

.hp-login-panel .hp-pin-input {
  font-size: 1.5rem !important;
  letter-spacing: 0.35em;
  text-align: center;
}

.hp-login-format-hint {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--muted);
}

.hp-login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  min-height: 54px;
  font-size: 1.0625rem;
  font-weight: 600;
  border-radius: 14px;
}

.hp-login-back {
  margin-top: 0.75rem;
}

.hp-login-error {
  margin: 1rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.45;
  text-align: left;
}

.hp-login-trust {
  margin-top: 1.75rem;
  padding: 1.25rem 0.5rem 0;
  text-align: center;
  border-top: 1px solid rgba(14, 39, 69, 0.1);
}

.hp-login-trust-lead {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--navy);
}

.hp-login-trust-detail {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 36ch;
  margin-inline: auto;
}

@media (min-width: 480px) {
  .hp-login-main {
    padding-top: calc(env(safe-area-inset-top, 0px) + 3rem);
    max-width: 460px;
  }

  .hp-login-header {
    margin-bottom: 2rem;
  }

  .hp-login-panel {
    padding: 2rem 1.75rem;
  }

  .hp-login-logo {
    max-width: 200px;
    max-height: 60px;
  }
}

.auth-greeting {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--navy);
  text-align: center;
  margin: 0 0 1rem;
}

.consent-on-file-banner {
  background: rgba(201, 162, 75, 0.12);
  border: 1px solid rgba(201, 162, 75, 0.35);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 12px;
  color: #0e2745;
  font-size: 0.95rem;
}

.consent-signature-wrap {
  margin: 12px 0 16px;
}

.consent-signature {
  display: block;
  width: 100%;
  max-width: 480px;
  height: auto;
  border: 1px solid #c8d0da;
  border-radius: 8px;
  background: #fff;
  touch-action: none;
}

.consent-clear-btn {
  margin-top: 8px;
}

/* Cituro SMS entry — show loading while session boots */
html.hp-cituro-phone-entry #hp-loading[hidden] {
  display: flex !important;
}

html.hp-cituro-phone-entry #step-greeting #greeting-continue {
  display: none !important;
}
