html.tabletka-heal-modal-open {
  overflow: hidden;
}

.tabletka-heal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  box-sizing: border-box;
}

.tabletka-heal-overlay[hidden] {
  display: none !important;
}

.tabletka-heal-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 8, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.tabletka-heal-overlay.is-visible .tabletka-heal-overlay-backdrop {
  opacity: 1;
}

.tabletka-heal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: min(520px, 100%);
  max-height: min(92vh, 880px);
  margin: 0;
  padding: 0;
  overflow: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0f0f0f;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 24px 80px rgba(0, 0, 0, 0.55),
    0 8px 32px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: scale(0.94) translateY(16px);
  transition:
    opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.tabletka-heal-overlay.is-visible .tabletka-heal-panel {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.tabletka-heal-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #e8e8ea;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.12s ease;
}

.tabletka-heal-modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.tabletka-heal-modal-close:active {
  transform: scale(0.94);
}

.tabletka-heal-modal-close span {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.tabletka-heal-modal-close svg {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.tabletka-heal-confirm {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(6, 6, 8, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.tabletka-heal-confirm[hidden] {
  display: none !important;
}

.tabletka-heal-confirm.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.tabletka-heal-confirm-card {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid #1f1f1f;
  background: #141416;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.32),
    0 24px 64px rgba(0, 0, 0, 0.45);
}

.tabletka-heal-confirm-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #2e2e30;
  background: #272729;
  color: #f8f8fa;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
}

.tabletka-heal-confirm-title {
  margin: 0;
  color: #f5f5f5;
  font-size: clamp(28px, 7vw, 38px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.76px;
}

.tabletka-heal-confirm-copy {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #f5f5f5;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.32px;
}

.tabletka-heal-confirm-button {
  width: 100%;
  min-width: 0;
  min-height: 72px;
  padding: 18px 22px;
  white-space: normal;
  text-align: center;
  line-height: 1.3;
}

.tabletka-heal-panel-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  /* Симметричные отступы 24px */
  padding: 24px;
  border-radius: inherit;
  border: none;
  background: transparent;
  box-shadow: none;
}

.tabletka-heal-panel-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 20px;
  min-width: 0;
  width: 100%;
  padding: 0;
}

.tabletka-heal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 1853px;
  border: 1.855px solid #2e2e30;
  background: #272729;
  box-shadow: 0 0 7px #000;
  color: #f8f8fa;
  font-size: 20px;
  font-weight: 300;
  line-height: normal;
  letter-spacing: 0;
}

.tabletka-heal-title {
  margin: 0;
  color: #f5f5f5;
  font-size: clamp(32px, 8vw, 48px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.96px;
  text-wrap: balance;
}

.tabletka-heal-wait {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  color: #9f9fa4;
}

.tabletka-heal-wait[hidden] {
  display: none !important;
}

.tabletka-heal-wait-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.34);
  animation: tabletka-heal-wait-pulse 1.4s ease-in-out infinite;
}

.tabletka-heal-wait-dot:nth-child(2) {
  animation-delay: 0.18s;
}

.tabletka-heal-wait-dot:nth-child(3) {
  animation-delay: 0.36s;
}

.tabletka-heal-wait-text {
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.28px;
}

@keyframes tabletka-heal-wait-pulse {
  0%,
  80%,
  100% {
    opacity: 0.22;
    transform: scale(0.9);
  }

  40% {
    opacity: 0.9;
    transform: scale(1);
  }
}

.tabletka-heal-timer-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid #1f1f1f;
  background: #161618;
}

.tabletka-heal-timer-label {
  color: #909092;
  font-size: 15px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: -0.3px;
}

.tabletka-heal-timer {
  color: #f5f5f5;
  font-size: 40px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}

.tabletka-heal-status,
.tabletka-heal-error {
  width: 100%;
  padding: 16px 18px;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.32px;
}

.tabletka-heal-status {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #f5f5f5;
}

.tabletka-heal-error {
  border: 1px solid rgba(255, 111, 111, 0.18);
  background: rgba(143, 34, 34, 0.24);
  color: #ffd6d6;
}

.tabletka-heal-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.tabletka-heal-step {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 12px 16px 12px 12px;
  border-radius: 20px;
  border: 1px solid #1f1f1f;
  background: #161618;
}

.tabletka-heal-step-index {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f5f5f5;
  color: #272729;
  font-size: 16px;
  font-weight: 600;
  line-height: normal;
  letter-spacing: -0.32px;
}

.tabletka-heal-step-text {
  color: #f5f5f5;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.34px;
}

.tabletka-heal-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 12px;
  width: 100%;
}

.tabletka-heal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  flex: 1 1 0;
  min-width: 0;
  padding: 17px 20px;
  border-radius: 999px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 1);
  text-decoration: none;
  transition:
    opacity 0.2s ease,
    transform 0.1s ease;
  cursor: pointer;
  font-size: 16px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: -0.32px;
}

.tabletka-heal-button:hover {
  opacity: 0.95;
}

.tabletka-heal-button:active {
  transform: scale(0.98);
}

.tabletka-heal-button.primary {
  background: #f5f5f5;
  border: 1px solid #ffffff;
  color: #272729;
}

.tabletka-heal-button.secondary {
  background: #272729;
  border: 1px solid #2e2e30;
  color: #f8f8fa;
}

@media (max-width: 760px) {
  .tabletka-heal-panel {
    max-height: min(94vh, 900px);
    border-radius: 32px;
  }

  .tabletka-heal-panel-inner {
    gap: 16px;
    padding: 12px;
    border-radius: 32px;
  }

  .tabletka-heal-modal-close {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    margin: 0;
  }

  .tabletka-heal-panel-copy {
    gap: 16px;
    padding: 0;
  }

  .tabletka-heal-confirm {
    padding: 16px;
  }

  .tabletka-heal-confirm-card {
    gap: 14px;
    padding: 18px;
    border-radius: 22px;
  }

  .tabletka-heal-confirm-title {
    font-size: 30px;
  }

  .tabletka-heal-confirm-copy {
    padding: 14px 16px;
    font-size: 15px;
  }

  .tabletka-heal-confirm-button {
    min-height: 68px;
    padding: 16px 18px;
    font-size: 15px;
  }

  .tabletka-heal-badge {
    min-height: 28px;
    padding: 4px 6px;
    gap: 4px;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: -0.24px;
  }

  .tabletka-heal-title {
    font-size: 34px;
    letter-spacing: -0.68px;
  }

  .tabletka-heal-wait {
    min-height: 30px;
    padding: 7px 10px;
    gap: 7px;
  }

  .tabletka-heal-wait-dot {
    width: 5px;
    height: 5px;
  }

  .tabletka-heal-wait-text {
    font-size: 13px;
    letter-spacing: -0.26px;
  }

  .tabletka-heal-timer-wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 18px;
  }

  .tabletka-heal-timer {
    font-size: 30px;
    letter-spacing: -0.75px;
  }

  .tabletka-heal-status,
  .tabletka-heal-error {
    padding: 14px 16px;
    border-radius: 18px;
    font-size: 15px;
  }

  .tabletka-heal-step {
    grid-template-columns: 34px minmax(0, 1fr);
    min-height: 58px;
    padding: 10px 12px 10px 10px;
    border-radius: 18px;
  }

  .tabletka-heal-step-index {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }

  .tabletka-heal-step-text {
    font-size: 15px;
    letter-spacing: -0.3px;
  }

  .tabletka-heal-actions {
    flex-direction: column;
  }

  .tabletka-heal-button {
    flex: none;
    width: 100%;
    min-width: 0;
  }
}
