/* Amu — мягкая карточка, пилюли, 2 колонки */
.quiz-root {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .28s ease, visibility .28s ease;
  font-family: "Sora", system-ui, sans-serif;
  color: #1c2421;
}

.quiz-root.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.quiz-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 32, 28, .55);
  backdrop-filter: blur(8px);
}

.quiz-panel {
  position: relative;
  z-index: 1;
  width: min(540px, 100%);
  max-height: min(92svh, 780px);
  overflow: auto;
  background:
    radial-gradient(circle at 100% 0%, rgba(22, 138, 253, .12), transparent 42%),
    #f7f6f1;
  border: 1px solid #d5ddd4;
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(22, 53, 46, .22);
  padding: 30px 26px 24px;
  transform: translateY(18px) scale(.97);
  transition: transform .28s ease;
}

.quiz-root.is-open .quiz-panel {
  transform: none;
}

.quiz-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #16352e;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(22, 53, 46, .08);
}

.quiz-progress {
  display: flex;
  gap: 8px;
  margin: 0 44px 22px 0;
}

.quiz-progress i {
  flex: 1;
  height: 6px;
  border-radius: 99px;
  background: #dfe6df;
}

.quiz-progress i.on {
  background: linear-gradient(90deg, #168afd, #2f5d50);
}

.quiz-kicker {
  margin: 0 0 8px;
  display: inline-flex;
  padding: .28rem .7rem;
  border-radius: 999px;
  background: rgba(22, 138, 253, .12);
  color: #168afd;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.quiz-title {
  margin: 0 0 10px;
  font-family: "Newsreader", Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.7rem, 4.2vw, 2.15rem);
  line-height: 1.12;
  color: #16352e;
  padding-right: 28px;
}

.quiz-sub {
  margin: 0 0 22px;
  color: #5d6a64;
  font-size: .95rem;
  line-height: 1.45;
}

.quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quiz-option {
  appearance: none;
  width: 100%;
  text-align: center;
  border: 0;
  background: #fff;
  color: #1c2421;
  border-radius: 999px;
  padding: 14px 12px;
  font: inherit;
  font-weight: 600;
  font-size: .92rem;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(22, 53, 46, .06);
  transition: transform .15s, background .15s, color .15s, box-shadow .15s;
}

.quiz-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(22, 53, 46, .1);
}

.quiz-option.is-selected {
  background: #168afd;
  color: #fff;
  box-shadow: 0 10px 22px rgba(22, 138, 253, .28);
}

.quiz-fields {
  display: grid;
  gap: 14px;
}

.quiz-field label {
  display: block;
  margin-bottom: 7px;
  font-size: .8rem;
  font-weight: 700;
  color: #16352e;
}

.quiz-field input {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 16px;
  padding: 0 16px;
  font: inherit;
  font-size: 1rem;
  outline: none;
  background: #fff;
  color: #1c2421;
  box-shadow: inset 0 0 0 1.5px #d5ddd4;
}

.quiz-field input:focus {
  box-shadow: inset 0 0 0 2px #168afd, 0 0 0 4px rgba(22, 138, 253, .15);
}

.quiz-messengers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.quiz-messenger {
  appearance: none;
  border: 0;
  background: #fff;
  border-radius: 999px;
  min-height: 46px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  color: #1c2421;
  box-shadow: inset 0 0 0 1.5px #d5ddd4;
}

.quiz-messenger.is-selected {
  background: #16352e;
  color: #fff;
  box-shadow: none;
}

.quiz-nav {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.quiz-nav-back .quiz-btn-ghost {
  width: 100%;
}

.quiz-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  min-height: 50px;
  padding: 0 22px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.quiz-btn-ghost {
  background: #e8eee8;
  color: #16352e;
}

.quiz-btn-primary {
  flex: 1;
  background: #168afd;
  color: #fff;
}

.quiz-btn-primary:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.quiz-note {
  margin: 14px 0 0;
  font-size: 12px;
  color: #5d6a64;
  text-align: center;
  line-height: 1.4;
}

.quiz-note a {
  color: #168afd;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.quiz-step { display: none; }
.quiz-step.is-active { display: block; }

@media (max-width: 520px) {
  .quiz-options { grid-template-columns: 1fr; }
  .quiz-panel { padding: 24px 16px 18px; border-radius: 22px; }
}
