.app-test-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin: 18px 0;
  padding: 22px;
  border: 1px solid rgba(15, 76, 129, .18);
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, .14), transparent 34%),
    linear-gradient(135deg, #eef7ff 0%, #ffffff 46%, #f5f3ff 100%);
  box-shadow: 0 18px 42px rgba(17, 40, 63, .08);
}

.app-test-card__media {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 26px;
  background: linear-gradient(135deg, #eef2ff, #ecfdf5);
  border: 1px solid rgba(79, 70, 229, .16);
  box-shadow: 0 14px 28px rgba(15, 76, 129, .10);
}

.app-test-card__media img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  display: block;
}

.app-test-card__emoji {
  font-size: 44px;
  line-height: 1;
}

.app-test-card__kicker,
.app-test-modal__kicker {
  margin: 0 0 6px;
  color: var(--color-primary-strong, #0a3a63);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.app-test-card__title {
  margin: 0 0 8px;
  color: var(--color-primary-strong, #0a3a63);
  font-size: clamp(1.28rem, 2vw, 1.65rem);
  line-height: 1.18;
  letter-spacing: -.03em;
}

.app-test-card__text {
  margin: 0 0 8px;
  color: var(--color-text, #17202a);
  line-height: 1.65;
}

.app-test-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.app-test-card__button {
  background: linear-gradient(135deg, #0f4c81, #7c3aed);
  color: #fff;
  border-color: transparent;
}

.app-test-card__button:hover {
  color: #fff;
  background: linear-gradient(135deg, #0a3a63, #6d28d9);
}

.app-test-card__note {
  color: var(--color-text-soft, #52606d);
  font-size: .92rem;
  font-weight: 700;
}

.app-test-modal {
  position: fixed;
  inset: 0;
  z-index: 3600;
  display: none;
}

.app-test-modal.is-open {
  display: block;
}

.app-test-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 18, 28, .62);
  backdrop-filter: blur(6px);
}

.app-test-modal__dialog {
  position: relative;
  width: min(calc(100% - 24px), 720px);
  max-height: min(92vh, 900px);
  overflow: auto;
  margin: 4vh auto 0;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, .20);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(8, 18, 28, .34);
}

.app-test-modal__header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.app-test-modal__header h2 {
  margin: 0;
  color: var(--color-primary-strong, #0a3a63);
  font-size: clamp(1.55rem, 4vw, 2.2rem);
  line-height: 1.08;
  letter-spacing: -.045em;
}

.app-test-modal__close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-border, #d7e0ea);
  border-radius: 999px;
  background: #fff;
  color: var(--color-text, #17202a);
  font-size: 1.45rem;
  line-height: 1;
}

.app-test-modal__close:hover {
  background: var(--color-primary-soft, #e6f0f8);
  color: var(--color-primary-strong, #0a3a63);
}

.app-test-modal__body p {
  color: var(--color-text, #17202a);
  line-height: 1.7;
}

.app-test-modal__steps {
  margin: 18px 0;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(16, 185, 129, .22);
  background: #ecfdf5;
}

.app-test-modal__steps h3 {
  margin: 0 0 10px;
  color: #064e3b;
  font-size: 1.05rem;
}

.app-test-modal__steps ul {
  margin: 0;
  padding-left: 1.25rem;
}

.app-test-modal__steps li + li {
  margin-top: 6px;
}

.app-test-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.app-test-form__hidden {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.app-test-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.app-test-modal__button {
  min-width: 170px;
}

.app-test-form__privacy {
  margin: 0;
  color: var(--color-text-soft, #52606d);
  font-size: .9rem;
}

body.has-app-test-modal-open {
  overflow: hidden;
}

@media (max-width: 700px) {
  .app-test-card {
    grid-template-columns: 1fr;
    text-align: left;
    padding: 18px;
  }

  .app-test-card__media {
    width: 72px;
    height: 72px;
  }

  .app-test-card__emoji {
    font-size: 36px;
  }

  .app-test-card__actions,
  .app-test-form__actions {
    display: grid;
  }

  .app-test-modal__dialog {
    padding: 18px;
    border-radius: 22px;
  }

  .app-test-modal__button,
  .app-test-card__button {
    width: 100%;
  }
}
