/* =============================================
   FIND MY OP NUMBER — Patient-facing screen
   VitalGlass extension (relies on main.css
   design tokens: colors, radii, glass, fonts)
   Preserves original medical color theme.
   ============================================= */

/* --- Page shell --- */
body.opf-body {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(1100px 560px at 8% -12%, rgba(13, 148, 136, 0.18), transparent 60%),
    radial-gradient(900px 520px at 112% 18%, rgba(0, 104, 95, 0.14), transparent 58%),
    linear-gradient(165deg, #eefaf7 0%, #f7f9fb 48%, #e9f6f3 100%);
  user-select: none;
  -webkit-user-select: none;
}

/* Decorative ambient orbs (VitalGlass background accent) */
.opf-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.opf-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  opacity: 0.55;
  animation: opfOrbFloat 14s ease-in-out infinite alternate;
}
.opf-orb-1 {
  width: 340px;
  height: 340px;
  background: rgba(13, 148, 136, 0.38);
  top: -90px;
  left: -80px;
}
.opf-orb-2 {
  width: 300px;
  height: 300px;
  background: rgba(0, 104, 95, 0.30);
  bottom: -70px;
  right: -70px;
  animation-delay: -7s;
}

@keyframes opfOrbFloat {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(20px, 25px) scale(1.08); }
}

.opf-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px calc(24px + var(--safe-bottom));
}

/* --- Glass card container --- */
.opf-shell {
  width: 100%;
  max-width: 480px;
  padding: 32px 28px 30px;
  box-shadow: 0 12px 40px rgba(0, 104, 95, 0.10), 0 1px 3px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.90);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* --- Brand header & controls --- */
.opf-brand-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.opf-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.opf-icon-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--outline-var);
  background: rgba(255, 255, 255, 0.85);
  color: var(--on-surface-var);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 104, 95, 0.06);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}
.opf-icon-tool-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary-dark);
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.16);
}
.opf-icon-tool-btn:active {
  transform: scale(0.92);
}
.opf-icon-tool-btn.muted {
  background: var(--surface-low);
  color: var(--outline);
}

/* Recent Search Chip */
.opf-recent-wrap {
  display: flex;
  justify-content: center;
  margin: -10px 0 16px;
  animation: opfFadeIn 0.3s ease;
}
.opf-recent-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--surface-low);
  border: 1.5px dashed rgba(13, 148, 136, 0.35);
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-dark);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.opf-recent-chip strong {
  color: var(--primary-light);
  letter-spacing: 0.02em;
}
.opf-recent-chip:hover {
  background: var(--primary-soft);
  border-color: var(--primary-light);
  transform: translateY(-1px);
}
.opf-recent-chip:active {
  transform: scale(0.96);
}

.opf-brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18), 0 4px 12px rgba(0, 104, 95, 0.15);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.opf-brand-logo:hover {
  transform: rotate(6deg) scale(1.05);
}
.opf-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.opf-brand-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--primary-dark);
  letter-spacing: -0.01em;
}
.opf-brand-sub {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-light);
}

/* --- Views --- */
.opf-view {
  display: none;
}
.opf-view.active {
  display: block;
  animation: opfViewFadeUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes opfViewFadeUp {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* --- Text --- */
.opf-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.45rem, 5.5vw, 1.75rem);
  letter-spacing: -0.02em;
  color: var(--primary-dark);
  text-align: center;
  margin: 0;
}
.opf-sub {
  font-size: 0.94rem;
  color: var(--on-surface-var);
  text-align: center;
  margin: 6px 0 20px;
  line-height: 1.45;
}

/* --- Form & Interactive Input Group --- */
.opf-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.opf-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--on-surface-var);
  margin-bottom: 0;
}
.opf-label-badge {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary-light);
  background: var(--primary-soft);
  padding: 2px 8px;
  border-radius: 6px;
}

.opf-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 60px;
  background: #ffffff;
  border: 2px solid var(--outline-var);
  border-radius: 16px;
  padding: 0 8px 0 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  user-select: text;
  -webkit-user-select: text;
}
.opf-input-wrap:focus-within {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px var(--primary-soft), 0 4px 16px rgba(13, 148, 136, 0.12);
  transform: translateY(-1px);
}
.opf-input-wrap.error-shake {
  animation: opfShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  border-color: var(--accent-red);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

@keyframes opfShake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(3px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

.opf-prefix-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: var(--surface-low);
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-right: 8px;
  flex-shrink: 0;
  user-select: none;
}
.opf-flag {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  color: var(--primary-dark);
}

.opf-input {
  flex: 1;
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--on-surface);
  padding: 0;
  outline: none;
  user-select: text;
  -webkit-user-select: text;
}
.opf-input::placeholder {
  color: var(--outline);
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0.7;
}

/* Paste button */
.opf-paste-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(13, 148, 136, 0.25);
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-family: var(--font-head);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 6px;
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.opf-paste-btn:hover {
  background: var(--primary-light);
  color: #ffffff;
  transform: scale(1.05);
}
.opf-paste-btn:active {
  transform: scale(0.94);
}
.opf-paste-btn.hidden {
  display: none !important;
}

/* Clear button */
.opf-clear-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--surface-mid);
  color: var(--outline);
  cursor: pointer;
  flex-shrink: 0;
  margin-left: 6px;
  transition: all 0.18s ease;
}
.opf-clear-btn.visible {
  display: flex;
}
.opf-clear-btn:hover {
  background: var(--outline-var);
  color: var(--on-surface);
  transform: scale(1.08);
}
.opf-clear-btn:active {
  transform: scale(0.92);
}

/* Dynamic 10-Digit Interactive Progress Capsules */
.opf-digit-meter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 8px;
  background: rgba(238, 250, 247, 0.6);
  border-radius: 12px;
  border: 1px solid rgba(13, 148, 136, 0.12);
  transition: all 0.25s ease;
}
.opf-digit-dot {
  width: 14px;
  height: 6px;
  border-radius: 4px;
  background: rgba(188, 201, 198, 0.55);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.opf-digit-dot.filled {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  transform: scaleY(1.35);
  box-shadow: 0 0 8px rgba(13, 148, 136, 0.45);
}
.opf-digit-sep {
  width: 2px;
  height: 9px;
  background: var(--outline-var);
  margin: 0 3px;
  border-radius: 2px;
  opacity: 0.7;
}
.opf-digit-meter.complete {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
}
.opf-digit-meter.complete .opf-digit-dot {
  background: #10B981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

/* Meta row under input: error message & digit counter */
.opf-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  min-height: 22px;
  gap: 8px;
}
.opf-error {
  display: none;
  color: var(--accent-red);
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
}
.opf-error.visible {
  display: block;
}
.opf-counter {
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--outline);
  background: var(--surface-low);
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.opf-counter.valid {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
  font-weight: 800;
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.25);
  animation: opfPulseCounter 0.3s ease;
}
@keyframes opfPulseCounter {
  0% { transform: scale(0.92); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* =============================================
   ENTERTAINING INTERACTIVE MEDICAL SCANNER STATION
   Keeps patients entertained during query:
   - Interactive Heart Booster Mini-Game
   - Oscilloscope Screen with Laser Scanline
   - Live Diagnostic Step-Tracker
   - Rotating Health Trivia & Clinic Tips
   ============================================= */
.opf-loading-state {
  display: none;
  margin: 18px 0 8px;
  animation: opfFadeIn 0.35s ease;
}
.opf-loading-state.active {
  display: block;
}

.opf-scanner-station {
  position: relative;
  background: linear-gradient(160deg, #f0fbf8 0%, #ffffff 50%, #eaf7f4 100%);
  border: 1.5px solid rgba(13, 148, 136, 0.35);
  border-radius: 20px;
  padding: 18px 16px 16px;
  box-shadow: 0 10px 30px rgba(0, 104, 95, 0.09), inset 0 1px 3px rgba(255, 255, 255, 0.9);
  overflow: hidden;
}

/* --- Heart Booster Mini-Game Bar --- */
.opf-booster-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(13, 148, 136, 0.2);
  border-radius: 16px;
  padding: 10px 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}
.opf-heart-btn-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

/* Interactive Beating Heart Button */
.opf-heart-booster {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(239, 68, 68, 0.3);
  background: linear-gradient(135deg, #fff1f2, #ffe4e6);
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
  transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  -webkit-user-select: none;
}
.opf-heart-booster:hover {
  transform: scale(1.08);
}
.opf-heart-booster:active,
.opf-heart-booster.active-pop {
  transform: scale(0.9) rotate(-6deg);
}
.opf-heart-icon {
  font-size: 1.45rem;
  line-height: 1;
  display: inline-block;
  animation: opfHeartBeat 1.1s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  transform-origin: center center;
}
@keyframes opfHeartBeat {
  0% { transform: scale(1); }
  14% { transform: scale(1.22); }
  28% { transform: scale(1.02); }
  42% { transform: scale(1.28); }
  70% { transform: scale(1); }
  100% { transform: scale(1); }
}

.opf-heart-glow {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.35), transparent 70%);
  pointer-events: none;
  animation: opfHeartGlow 1.8s ease-in-out infinite alternate;
}
@keyframes opfHeartGlow {
  from { opacity: 0.4; transform: scale(0.95); }
  to { opacity: 0.9; transform: scale(1.15); }
}

.opf-booster-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.opf-bpm-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
}
.opf-bpm-num {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.15rem;
  color: #be123c;
  line-height: 1;
}
.opf-bpm-unit {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--on-surface-var);
}
.opf-bpm-tag {
  font-size: 0.66rem;
  font-weight: 800;
  color: #047857;
  background: rgba(16, 185, 129, 0.14);
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 4px;
}
.opf-tap-hint {
  font-size: 0.75rem;
  color: var(--on-surface-var);
  margin-top: 3px;
  white-space: nowrap;
}
.opf-tap-highlight {
  color: #be123c;
  font-weight: 800;
}

/* Boost count badge */
.opf-boost-counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  background: rgba(13, 148, 136, 0.1);
  border: 1px solid rgba(13, 148, 136, 0.25);
  border-radius: 10px;
  flex-shrink: 0;
  min-width: 52px;
}
.opf-boost-count {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.15rem;
  color: var(--primary-dark);
  line-height: 1;
}
.opf-boost-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--primary-light);
  margin-top: 2px;
}

/* Floating Sparkle Particles when Heart is tapped */
.opf-float-sparkle {
  position: absolute;
  pointer-events: none;
  font-size: 0.9rem;
  font-weight: 800;
  color: #e11d48;
  animation: opfFloatUp 0.8s ease-out forwards;
  z-index: 50;
}
@keyframes opfFloatUp {
  0% { opacity: 1; transform: translate(0, 0) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx, 0px), -44px) scale(1.3); }
}

/* --- Holographic Oscilloscope Screen with Laser Scanline --- */
.opf-screen-card {
  position: relative;
  background: radial-gradient(circle at 50% 50%, #03201d 0%, #001412 100%);
  border: 1.5px solid rgba(13, 148, 136, 0.45);
  border-radius: 16px;
  padding: 12px 14px 10px;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.6), 0 4px 16px rgba(0, 104, 95, 0.15);
  margin-bottom: 12px;
}

.opf-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(13, 148, 136, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 148, 136, 0.12) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

/* Moving Laser Scanline */
.opf-laser-beam {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #2dd4bf, #34d399, transparent);
  box-shadow: 0 0 12px #34d399, 0 0 24px rgba(45, 212, 191, 0.6);
  pointer-events: none;
  z-index: 2;
  animation: opfLaserSweep 2.2s ease-in-out infinite alternate;
}
@keyframes opfLaserSweep {
  0% { top: 0%; opacity: 0.3; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { top: 98%; opacity: 0.3; }
}

/* Heartbeat ECG Line */
.opf-ecg-svg {
  width: 100%;
  height: 52px;
  display: block;
  overflow: visible;
  position: relative;
  z-index: 1;
}
.opf-ecg-bg-line {
  stroke: rgba(45, 212, 191, 0.2);
  stroke-width: 2.2;
  fill: none;
}
.opf-ecg-pulse-line {
  stroke: #2dd4bf;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 85 235;
  stroke-dashoffset: 320;
  filter: drop-shadow(0 0 6px rgba(45, 212, 191, 0.9));
  animation: opfEcgBeat 1.7s linear infinite;
}
@keyframes opfEcgBeat {
  0% { stroke-dashoffset: 320; }
  100% { stroke-dashoffset: 0; }
}

.opf-live-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  position: relative;
  z-index: 3;
}
.opf-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  flex-shrink: 0;
  animation: opfPulseDot 1.2s ease infinite;
}
@keyframes opfPulseDot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px #34d399; }
  100% { transform: scale(0.9); opacity: 0.8; }
}
.opf-ticker-text {
  flex: 1;
  font-size: 0.84rem;
  font-weight: 700;
  color: #e6fffa;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}
.opf-percent-text {
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 800;
  color: #34d399;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 6px rgba(52, 211, 153, 0.6);
}

/* Luminous Progress Track & Bar */
.opf-load-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  margin-top: 8px;
  overflow: hidden;
  position: relative;
  z-index: 3;
}
.opf-load-bar {
  height: 100%;
  width: 15%;
  background: linear-gradient(90deg, #0d9488, #2dd4bf, #34d399);
  border-radius: 4px;
  box-shadow: 0 0 8px #34d399;
  transition: width 0.3s ease;
}

/* --- Live Diagnostic Checklist --- */
.opf-steps-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  margin-bottom: 12px;
  padding: 6px 4px 2px;
}
.opf-step-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--outline);
  transition: all 0.25s ease;
}
.opf-step-icon {
  font-size: 0.76rem;
  font-weight: 800;
  width: 14px;
  text-align: center;
}
.opf-step-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.opf-step-item.done {
  color: #047857;
  font-weight: 700;
}
.opf-step-item.done .opf-step-icon {
  color: #10b981;
}
.opf-step-item.active {
  color: var(--primary-dark);
  font-weight: 800;
}
.opf-step-item.active .opf-step-icon {
  color: var(--primary-light);
  animation: opfPulseIcon 0.8s ease infinite alternate;
}
@keyframes opfPulseIcon {
  from { transform: scale(0.9); }
  to { transform: scale(1.3); }
}

/* --- Rotating Entertaining Health Trivia & Tips Carousel --- */
.opf-trivia-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px solid rgba(13, 148, 136, 0.22);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 2px 8px rgba(0, 104, 95, 0.05);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.opf-trivia-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}
.opf-trivia-badge {
  font-family: var(--font-head);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--primary-light);
  background: var(--primary-soft);
  padding: 2px 7px;
  border-radius: 6px;
}
.opf-trivia-tag {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--outline);
}
.opf-trivia-content {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--on-surface);
  line-height: 1.42;
  margin: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.opf-trivia-content.swap {
  opacity: 0;
  transform: translateY(4px);
}

/* --- Buttons --- */
.opf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  margin-top: 16px;
  background: linear-gradient(135deg, #00685f, #0d9488);
  color: #ffffff;
  border: none;
  border-radius: 16px;
  font-family: var(--font-head);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  box-shadow: 0 8px 22px rgba(13, 148, 136, 0.32);
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.16s ease, filter 0.16s ease;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
  overflow: hidden;
}
.opf-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(13, 148, 136, 0.42);
  filter: brightness(1.04);
}
.opf-btn:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.25);
}
.opf-btn.ready {
  background: linear-gradient(135deg, #00685f 0%, #0d9488 50%, #10b981 100%);
  background-size: 200% 200%;
  animation: opfReadyPulse 2.4s ease infinite;
  box-shadow: 0 8px 28px rgba(16, 185, 129, 0.42), 0 0 0 2px rgba(16, 185, 129, 0.25);
}
@keyframes opfReadyPulse {
  0% { background-position: 0% 50%; box-shadow: 0 8px 24px rgba(13, 148, 136, 0.35); }
  50% { background-position: 100% 50%; box-shadow: 0 10px 32px rgba(16, 185, 129, 0.52); }
  100% { background-position: 0% 50%; box-shadow: 0 8px 24px rgba(13, 148, 136, 0.35); }
}
.opf-btn:disabled {
  opacity: 0.75;
  transform: none;
  cursor: not-allowed;
  filter: grayscale(0.2);
}
.opf-btn-icon {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.opf-btn:hover .opf-btn-icon {
  transform: scale(1.1);
}

.opf-btn-ghost {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border: 1.5px solid rgba(13, 148, 136, 0.25);
  box-shadow: none;
  font-weight: 700;
}
.opf-btn-ghost:hover {
  background: rgba(13, 148, 136, 0.18);
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.15);
  color: var(--primary-dark);
}

/* Spinner inside loading button */
.opf-spin-loader {
  width: 20px;
  height: 20px;
  border: 2.8px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: opfSpin 0.75s linear infinite;
}
@keyframes opfSpin {
  to { transform: rotate(360deg); }
}

/* --- STEP 3: INTERACTIVE OP TOKEN RESULT CARD --- */
.opf-confetti-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 30;
}

.opf-success-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border-radius: 30px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 auto 14px;
  display: table;
}
.opf-badge-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: opfBadgePing 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes opfBadgePing {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.opf-patient-header {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid var(--outline-var);
  border-radius: 16px;
  padding: 12px 16px;
  margin: 14px 0 16px;
}
.opf-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00685f, #0d9488);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
}
.opf-patient-info {
  min-width: 0;
  flex: 1;
}
.opf-person-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--on-surface);
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.opf-person-confirm {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--on-surface-var);
  margin-top: 3px;
}

/* 3D Holographic OP Token Ticket Box */
.opf-token-card {
  position: relative;
  background: linear-gradient(145deg, #f0fbf8, #e0f6f0);
  border: 2px dashed rgba(13, 148, 136, 0.45);
  border-radius: 20px;
  padding: 20px 18px 16px;
  text-align: center;
  margin: 12px 0 14px;
  box-shadow: 0 8px 28px rgba(0, 104, 95, 0.08), inset 0 2px 6px rgba(13, 148, 136, 0.05);
  transform-style: preserve-3d;
  perspective: 800px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
  overflow: hidden;
}
.opf-token-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle 260px at var(--sheen-x, 50%) var(--sheen-y, 50%), rgba(255, 255, 255, 0.7), transparent 70%);
  opacity: 0.8;
  mix-blend-mode: overlay;
}
.opf-token-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.opf-token-chip {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--primary);
  background: rgba(13, 148, 136, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
}
.opf-token-status {
  font-size: 0.72rem;
  font-weight: 800;
  color: #047857;
  letter-spacing: 0.06em;
}
.opf-token-label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--primary-light);
  margin-bottom: 2px;
}
.opf-op-value {
  display: block;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2.4rem, 12vw, 3.4rem);
  letter-spacing: 0.03em;
  color: var(--primary-dark);
  line-height: 1.1;
  margin: 4px 0 10px;
  overflow-wrap: anywhere;
  user-select: all;
  -webkit-user-select: all;
  cursor: pointer;
}

/* Scannable Barcode Box */
.opf-barcode-box {
  background: #ffffff;
  border: 1.5px solid rgba(13, 148, 136, 0.25);
  border-radius: 12px;
  padding: 10px 10px 8px;
  margin: 8px 0 2px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}
.opf-barcode-box:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(13, 148, 136, 0.14);
}
.opf-barcode-svg-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
}
.opf-barcode-svg-wrap svg {
  max-width: 100%;
  height: 48px;
}
.opf-barcode-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--primary-light);
  margin-top: 4px;
}

/* Interactive Quick Actions Grid */
.opf-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.opf-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 4px;
  border-radius: 14px;
  background: #ffffff;
  border: 1.5px solid var(--outline-var);
  color: var(--on-surface-var);
  font-family: var(--font-head);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-height: 58px;
}
.opf-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(0, 104, 95, 0.12);
  border-color: var(--primary-light);
  color: var(--primary-dark);
}
.opf-action-btn:active {
  transform: scale(0.94);
}
.opf-action-copy:hover {
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.opf-action-copy.copied {
  background: #047857;
  color: #ffffff;
  border-color: #047857;
}
.opf-action-wa:hover {
  background: rgba(37, 211, 102, 0.12);
  color: #059669;
  border-color: #10B981;
}
.opf-action-speak:hover {
  background: rgba(59, 130, 246, 0.12);
  color: #2563EB;
  border-color: #3B82F6;
}
.opf-action-enlarge:hover {
  background: rgba(245, 158, 11, 0.12);
  color: #D97706;
  border-color: #F59E0B;
}

/* Reception guidance banner */
.opf-reception-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--outline-var);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--on-surface-var);
  line-height: 1.4;
  margin-bottom: 6px;
}
.opf-reception-notice svg {
  color: var(--primary-light);
  flex-shrink: 0;
}
.opf-reception-notice svg {
  color: var(--primary-light);
  flex-shrink: 0;
}

/* --- STEP 2: NAME SELECTION LIST --- */
.opf-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 8px 0 12px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 2px;
}
.opf-person-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.95);
  border: 1.5px solid var(--outline-var);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 3px 12px rgba(0, 104, 95, 0.06);
  cursor: pointer;
  transition: all 0.2s ease;
}
.opf-person-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(13, 148, 136, 0.15);
}
.opf-person-card:active {
  transform: translateY(0);
}
.opf-person-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.opf-person-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.opf-person-info {
  min-width: 0;
}
.opf-person-meta {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.opf-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  background: var(--surface-low);
  border-radius: 6px;
  color: var(--on-surface-var);
}
.opf-select-btn {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 18px;
  background: linear-gradient(135deg, #00685f, #0d9488);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 3px 10px rgba(13, 148, 136, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.opf-select-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 5px 14px rgba(13, 148, 136, 0.35);
}

/* --- MESSAGE VIEWS (NOT FOUND / ERROR) --- */
.opf-msg {
  text-align: center;
  padding: 10px 4px 6px;
}
.opf-msg-icon-box {
  width: 76px;
  height: 76px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--surface-low);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--outline);
}
.opf-msg-icon-error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-red);
}
.opf-msg-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--on-surface);
  margin-top: 6px;
}
.opf-msg-body {
  font-size: 0.95rem;
  color: var(--on-surface-var);
  line-height: 1.5;
  margin: 8px 0 14px;
}
.opf-helper-card {
  background: var(--primary-soft);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 14px;
}

/* --- FOOTER --- */
.opf-foot {
  margin-top: 18px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--outline);
  padding: 0 12px;
}

/* --- TOAST NOTIFICATION --- */
.opf-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(25, 28, 30, 0.92);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  z-index: 9999;
  backdrop-filter: blur(10px);
}
.opf-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --- FULLSCREEN SCANNER MODAL FOR RECEPTION DESK --- */
.opf-scanner-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.90);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: opfFadeIn 0.25s ease;
}
.opf-scanner-modal.active {
  display: flex;
}
.opf-scanner-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 28px;
  padding: 30px 24px 26px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  animation: opfModalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes opfModalPop {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.opf-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--surface-low);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--on-surface-var);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.opf-modal-close:hover {
  background: var(--surface-mid);
  transform: scale(1.1);
}
.opf-modal-tag {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--primary-light);
  background: var(--primary-soft);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 8px;
}
.opf-modal-patient {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--on-surface);
}
.opf-modal-op {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 2.8rem;
  color: var(--primary-dark);
  letter-spacing: 0.04em;
  margin: 6px 0 16px;
}
.opf-modal-barcode {
  background: #ffffff;
  border: 2.5px solid #000000;
  border-radius: 14px;
  padding: 18px 12px 14px;
  margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.opf-modal-barcode svg {
  width: 100%;
  height: 80px;
}
.opf-modal-hint {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--on-surface-var);
  margin-bottom: 18px;
  line-height: 1.4;
}
.opf-modal-done-btn {
  width: 100%;
  min-height: 52px;
  background: var(--primary-dark);
  color: #ffffff;
  border: none;
  border-radius: 16px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 104, 95, 0.25);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.opf-modal-done-btn:hover {
  background: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 104, 95, 0.35);
}
.opf-modal-done-btn:active {
  transform: scale(0.98);
}

/* --- MOBILE RESPONSIVE TUNING --- */
@media (max-width: 480px) {
  .opf-page {
    padding: 14px 10px calc(16px + var(--safe-bottom));
  }
  .opf-shell {
    padding: 24px 16px 22px;
    border-radius: 20px;
  }
  .opf-actions-grid {
    gap: 6px;
  }
  .opf-action-btn {
    min-height: 54px;
    font-size: 0.7rem;
    padding: 8px 2px;
  }
  .opf-input-wrap {
    height: 56px;
    padding: 0 6px 0 10px;
  }
  .opf-prefix-pill {
    padding: 5px 8px;
    font-size: 0.9rem;
  }
  .opf-input {
    font-size: 1.2rem;
  }
  .opf-btn {
    min-height: 54px;
    font-size: 0.98rem;
  }
  .opf-person-card {
    padding: 12px 14px;
  }
}

/* --- ACCESSIBILITY / REDUCED MOTION --- */
@media (prefers-reduced-motion: reduce) {
  .opf-orb,
  .opf-view.active,
  .opf-radar-ring,
  .opf-ecg-pulse-line,
  .opf-ticker-dot {
    animation: none;
  }
  .opf-btn,
  .opf-select-btn,
  .opf-copy-btn {
    transition: none;
  }
}

/* =============================================
   FULLSCREEN HOSPITAL DATABASE SPLASH LOADER
   Whole-screen takeover while going through
   the hospital registry. Percentage-driven.
   ============================================= */
body.opf-locked {
  overflow: hidden;
}

.opf-splash {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 14px calc(18px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(45, 212, 191, 0.22), transparent 60%),
    radial-gradient(700px 500px at 50% 115%, rgba(16, 185, 129, 0.16), transparent 60%),
    linear-gradient(170deg, #022a27 0%, #01302c 45%, #011a19 100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.32s ease, visibility 0.32s ease;
  overflow-y: auto;
}

.opf-splash.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Ambient layers */
.opf-splash-atmos {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.opf-splash-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
}
.opf-splash-orb-a {
  width: 340px;
  height: 340px;
  background: rgba(13, 148, 136, 0.55);
  top: -100px;
  left: -80px;
  animation: opfSplashDrift 9s ease-in-out infinite alternate;
}
.opf-splash-orb-b {
  width: 300px;
  height: 300px;
  background: rgba(52, 211, 153, 0.35);
  bottom: -90px;
  right: -70px;
  animation: opfSplashDrift 11s ease-in-out infinite alternate-reverse;
}
@keyframes opfSplashDrift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(24px, 28px) scale(1.1); }
}
.opf-splash-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(45, 212, 191, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 212, 191, 0.09) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at 50% 40%, black 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 40%, black 30%, transparent 78%);
}
.opf-splash-scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 120px;
  top: -120px;
  background: linear-gradient(to bottom, transparent, rgba(45, 212, 191, 0.14), transparent);
  animation: opfSplashScanDrop 3.2s linear infinite;
}
@keyframes opfSplashScanDrop {
  0% { top: -18%; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { top: 110%; opacity: 0; }
}

/* Card */
.opf-splash-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(45, 212, 191, 0.35);
  border-radius: 26px;
  padding: 22px 20px 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 44px rgba(45, 212, 191, 0.18);
  text-align: center;
  transform: translateY(14px) scale(0.98);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  margin: auto;
}
.opf-splash.active .opf-splash-card {
  transform: translateY(0) scale(1);
}

.opf-splash-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.opf-splash-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.opf-splash-logo-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.opf-splash-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.25), 0 4px 14px rgba(0, 0, 0, 0.2);
}
.opf-splash-logo-ping {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid rgba(16, 185, 129, 0.7);
  animation: opfSplashPing 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
  pointer-events: none;
}
@keyframes opfSplashPing {
  0% { transform: scale(0.9); opacity: 1; }
  100% { transform: scale(1.35); opacity: 0; }
}
.opf-splash-brand-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}
.opf-splash-brand-text strong {
  font-family: var(--font-head);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--primary-dark);
}
.opf-splash-brand-text em {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--primary-light);
}
.opf-splash-secure {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #047857;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 5px 10px;
  border-radius: 20px;
  flex-shrink: 0;
}
.opf-splash-secure-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: opfPulseDot 1.2s ease infinite;
}

/* Percentage ring */
.opf-splash-ring-wrap {
  position: relative;
  width: 172px;
  height: 172px;
  margin: 2px auto 12px;
}
.opf-splash-ring {
  --p: 0;
  width: 172px;
  height: 172px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(#0d9488 calc(var(--p) * 1%), #34d399 calc(var(--p) * 1%), rgba(13, 148, 136, 0.14) 0);
  box-shadow: 0 10px 30px rgba(13, 148, 136, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  position: relative;
  transition: --p 0.2s linear;
}
.opf-splash-ring::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1.5px dashed rgba(13, 148, 136, 0.35);
  animation: opfSplashSpin 14s linear infinite;
}
@keyframes opfSplashSpin {
  to { transform: rotate(360deg); }
}
.opf-splash-ring-inner {
  width: 138px;
  height: 138px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #ffffff 0%, #eefaf7 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 10px rgba(0, 104, 95, 0.1);
}
.opf-splash-percent {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--primary-dark);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.opf-splash-percent-sub {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--primary-light);
  margin-top: 4px;
}
.opf-splash-orbit {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
  transform-origin: 50% 50%;
  z-index: 3;
}
.opf-splash-orbit i {
  position: absolute;
  left: 50%;
  top: 0;
  font-style: normal;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transform: translate(-50%, -50%);
}
.opf-splash-orbit-1 {
  inset: -6px;
  animation: opfSplashSpin 6s linear infinite;
}
.opf-splash-orbit-1 i {
  width: 30px;
  height: 30px;
  background: #0d9488;
  color: #fff;
  font-size: 1rem;
}
.opf-splash-orbit-2 {
  inset: 6px;
  animation: opfSplashSpinRev 9s linear infinite;
}
.opf-splash-orbit-2 i {
  width: 14px;
  height: 14px;
  background: #34d399;
  color: transparent;
  font-size: 0.4rem;
}
@keyframes opfSplashSpinRev {
  to { transform: rotate(-360deg); }
}

.opf-splash-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: -0.01em;
  color: var(--primary-dark);
  margin: 0;
}
.opf-splash-phone {
  font-size: 0.88rem;
  color: var(--on-surface-var);
  font-weight: 600;
  margin: 4px 0 14px;
}
.opf-splash-phone strong {
  color: var(--primary-dark);
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* Progress bar */
.opf-splash-track {
  position: relative;
  height: 12px;
  background: rgba(13, 148, 136, 0.14);
  border: 1px solid rgba(13, 148, 136, 0.2);
  border-radius: 20px;
  overflow: hidden;
}
.opf-splash-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00685f, #0d9488, #34d399);
  border-radius: 20px;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.7);
  transition: width 0.22s ease;
}
.opf-splash-shine {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.75), transparent);
  animation: opfSplashShine 1.4s ease-in-out infinite;
}
@keyframes opfSplashShine {
  0% { left: -70px; }
  100% { left: 110%; }
}

.opf-splash-status-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  min-height: 22px;
}
.opf-splash-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  flex-shrink: 0;
  animation: opfPulseDot 1s ease infinite;
}
.opf-splash-status {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--primary-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.18s ease;
}
.opf-splash-status.swap {
  opacity: 0;
}

/* Terminal log — the "going through database" feel */
.opf-splash-log {
  margin-top: 12px;
  background: #02211f;
  border: 1px solid rgba(45, 212, 191, 0.3);
  border-radius: 14px;
  padding: 10px 12px;
  min-height: 86px;
  max-height: 96px;
  overflow: hidden;
  text-align: left;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.55);
  position: relative;
}
.opf-splash-log::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22px;
  background: linear-gradient(transparent, rgba(2, 33, 31, 0.9));
  pointer-events: none;
}
.opf-splash-log-line {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  line-height: 1.55;
  color: #a7f3d0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  animation: opfSplashLogIn 0.28s ease;
}
.opf-splash-log-line b {
  color: #34d399;
  font-weight: 700;
}
.opf-splash-log-line.dim {
  color: rgba(167, 243, 208, 0.6);
}
@keyframes opfSplashLogIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Stats */
.opf-splash-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.opf-splash-stat {
  background: rgba(13, 148, 136, 0.08);
  border: 1px solid rgba(13, 148, 136, 0.18);
  border-radius: 14px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.opf-splash-stat strong {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.02rem;
  color: var(--primary-dark);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.opf-splash-stat span {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--on-surface-var);
}

.opf-splash-tip {
  margin: 12px 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--on-surface-var);
  background: rgba(245, 158, 11, 0.1);
  border: 1px dashed rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  padding: 8px 10px;
  line-height: 1.4;
  min-height: 36px;
}
.opf-splash-cancel-hint {
  margin: 8px 0 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--outline);
}

/* Success hold — makes the final 100% state unmistakable */
.opf-splash.complete .opf-splash-card {
  border-color: rgba(16, 185, 129, 0.65);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(16, 185, 129, 0.25), 0 0 60px rgba(16, 185, 129, 0.35);
}
.opf-splash.complete .opf-splash-ring {
  background: conic-gradient(#10b981 100%, rgba(16, 185, 129, 0.15) 0);
  box-shadow: 0 10px 34px rgba(16, 185, 129, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}
.opf-splash.complete .opf-splash-percent {
  color: #047857;
}
.opf-splash.complete .opf-splash-bar {
  background: linear-gradient(90deg, #047857, #10b981, #34d399);
}
.opf-splash.complete .opf-splash-status {
  color: #047857;
}

@media (max-width: 480px) {
  .opf-splash {
    padding: 12px 10px calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .opf-splash-card {
    padding: 18px 14px 14px;
    border-radius: 22px;
  }
  .opf-splash-ring-wrap,
  .opf-splash-ring {
    width: 152px;
    height: 152px;
  }
  .opf-splash-ring-inner {
    width: 122px;
    height: 122px;
  }
  .opf-splash-percent {
    font-size: 2.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .opf-splash-scan,
  .opf-splash-ring::before,
  .opf-splash-orbit-1,
  .opf-splash-orbit-2,
  .opf-splash-shine,
  .opf-splash-logo-ping {
    animation: none;
  }
}

