.tap { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tap .facts { margin: 0; }
.tap-wait { padding: 18px 8px 10px; text-align: center; }
.tap-ring { position: relative; width: 84px; height: 84px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 50%; background: var(--purple-soft); color: var(--purple); font-size: 34px; }
.tap-ring::before, .tap-ring::after { content: ''; position: absolute; inset: 0; border: 2px solid var(--purple-line); border-radius: 50%; animation: tap-pulse 2.4s ease-out infinite; }
.tap-ring::after { animation-delay: 1.2s; }
@keyframes tap-pulse {
  from { transform: scale(1); opacity: 1; }
  to { transform: scale(1.5); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .tap-ring::before, .tap-ring::after { animation: none; opacity: .6; }
}
.tap-wait h3 { font-size: 16px; font-weight: 700; }
.tap-wait p { margin-top: 2px; font-size: 13px; color: var(--muted); }
.tap .field-s { margin: 0; }
.tap-presenter { padding: 11px 13px; background: #F8F6FB; border: 1px dashed var(--line-2); border-radius: 10px; }
.tap-presenter summary { font-size: 12px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.tap-presenter .fine { margin: 7px 0 10px; }
.tap-presenter .field-s { margin: 0 0 10px; }
.tap-patient { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tap-avatar { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--purple); color: #fff; font-size: 13px; font-weight: 700; }
.tap-patient-txt { flex: 1 1 150px; min-width: 0; }
.tap-patient-txt b { display: block; font-size: 15px; font-weight: 700; }
.tap-patient-txt small { display: block; font-size: 11.5px; color: var(--muted); overflow-wrap: anywhere; }
.tap-figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tap-figures div { padding: 10px 12px; background: var(--purple-soft); border-radius: 10px; }
.tap-figures small { display: block; font-size: 11.5px; color: var(--ink-2); }
.tap-figures strong { display: block; margin-top: 2px; font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.tap-label { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.tap-bills { margin: -6px 0 0; padding: 0; list-style: none; }
.tap-bill { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; cursor: pointer; }
.tap-bills li:last-child .tap-bill { border-bottom: 0; }
.tap-bill input { width: 18px; height: 18px; flex: none; accent-color: var(--purple); }
.tap-bill-txt { flex: 1; min-width: 0; }
.tap-bill-txt b { display: block; font-weight: 600; }
.tap-bill-txt small { display: block; font-size: 11.5px; color: var(--muted); }
.tap-none, .tap-why { font-size: 13px; color: var(--ink-2); }
.tap-actions { display: flex; flex-direction: column; gap: 8px; }
[data-tform="code"] { display: flex; flex-direction: column; gap: 10px; }
.tap-result { padding: 10px 0 2px; text-align: center; }
.tap-result > span { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 9px; border-radius: 50%; font-size: 26px; }
.tap-result.good > span { background: var(--good-bg); color: var(--good); }
.tap-result.bad > span { background: var(--bad-bg); color: var(--bad); }
.tap-result h3 { font-size: 18px; font-weight: 700; }
.tap-result p { margin-top: 2px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }

/* pop-up window */
.popup-body { min-height: 100dvh; background: var(--canvas); }
.popup { max-width: 440px; margin: 0 auto; padding: 0 0 18px; }
.popup-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--sidebar); color: #fff; }
.popup-logo { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--purple-mid); font-size: 15px; }
.popup-head strong { display: block; font-size: 14px; font-weight: 700; line-height: 1.2; }
.popup-head small { display: block; font-size: 11px; color: var(--sidebar-muted); }
.popup-card { margin: 12px; padding: 15px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
