/* ===== Палитра: бежевые + красно-розовые пастельные ===== */
:root {
  --cream: #f7f0e6;
  --sand: #efe3d3;
  --blush: #f7d9d8;
  --rose: #e9a7a8;
  --deep-rose: #c86b74;
  --wine: #a4444f;
  --coffee: #5c4033;
  --soft-coffee: #7a5f52;
  --text: #4a3a33;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  padding: 28px 20px 60px;
  overflow-x: hidden;
}

/* ===== Фон: мягкие пастельные пятна ===== */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, var(--cream) 0%, var(--sand) 100%);
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.7;
}

.b1 { width: 45vmax; height: 45vmax; background: radial-gradient(circle, var(--blush) 0%, rgba(247, 217, 216, 0) 68%); top: -10%; left: -8%; }
.b2 { width: 38vmax; height: 38vmax; background: radial-gradient(circle, #f3d3c7 0%, rgba(243, 211, 199, 0) 68%); bottom: -12%; right: -10%; }
.b3 { width: 28vmax; height: 28vmax; background: radial-gradient(circle, #f2c9c4 0%, rgba(242, 201, 196, 0) 68%); top: 18%; left: 58%; }
.b4 { width: 20vmax; height: 20vmax; background: radial-gradient(circle, #eec9be 0%, rgba(238, 201, 190, 0) 68%); bottom: 22%; left: 12%; }
.b5 { width: 24vmax; height: 24vmax; background: radial-gradient(circle, var(--rose) 0%, rgba(233, 167, 168, 0) 68%); top: -6%; right: 24%; opacity: 0.5; }

/* ===== Обёртка ===== */
.wrap {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

.back {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--wine);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.back:hover { text-decoration: underline; }

/* ===== Появление элементов сверху вниз ===== */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.head     { animation: riseIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.05s backwards; }

/* ===== Шапка ===== */
.head {
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  padding: 34px 30px;
  text-align: center;
  box-shadow:
    0 24px 60px -20px rgba(164, 68, 79, 0.28),
    0 6px 20px -8px rgba(92, 64, 51, 0.15);
}

.title {
  font-size: 30px;
  font-weight: 800;
  color: var(--coffee);
  letter-spacing: -0.5px;
}

.subtitle {
  margin-top: 6px;
  color: var(--deep-rose);
  font-size: 17px;
  font-weight: 700;
}

.note {
  margin-top: 16px;
  color: var(--soft-coffee);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
}

/* ===== Блоки ===== */
.blk {
  margin-bottom: 22px;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  padding: 26px 24px 20px;
  box-shadow:
    0 18px 44px -22px rgba(164, 68, 79, 0.22),
    0 4px 14px -6px rgba(92, 64, 51, 0.12);
}

.blk-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--coffee);
  margin-bottom: 6px;
}

.blk:nth-of-type(1) { animation: riseIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.21s backwards; }
.blk:nth-of-type(2) { animation: riseIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.29s backwards; }
.blk:nth-of-type(3) { animation: riseIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.37s backwards; }
.blk:nth-of-type(4) { animation: riseIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.45s backwards; }
.blk:nth-of-type(5) { animation: riseIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.53s backwards; }

.btns { animation: riseIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.61s backwards; }

/* Уважение к настройке «уменьшить движение» */
@media (prefers-reduced-motion: reduce) {
  .head,
  .blk,
  .btns,
  .result {
    animation: none;
  }
}

/* ===== Пункты ===== */
.items { display: flex; flex-direction: column; }

.item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 2px;
  border-bottom: 1px solid rgba(233, 167, 168, 0.25);
}

.item:last-child { border-bottom: none; }

.item-q {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.item-q small {
  color: var(--deep-rose);
  font-weight: 800;
  margin-right: 8px;
}

/* ===== Переключатели ТАК / НЕ ТАК ===== */
.toggle {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 12px;
  border: 1px solid rgba(233, 167, 168, 0.45);
  background: rgba(255, 255, 255, 0.6);
  color: var(--soft-coffee);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.toggle label:hover {
  border-color: var(--rose);
  background: var(--blush);
}

.toggle input:focus-visible + label {
  outline: 3px solid var(--deep-rose);
  outline-offset: 2px;
}

.toggle input:checked + label[for^="yes"] {
  background: linear-gradient(120deg, var(--blush), var(--rose));
  color: var(--coffee);
  border-color: transparent;
}

.toggle input:checked + label[for^="no"] {
  background: var(--wine);
  color: #fff;
  border-color: transparent;
}

.blk-done {
  margin-top: 16px;
  text-align: right;
  color: var(--deep-rose);
  font-size: 13px;
  font-weight: 700;
}

.blk-done b { color: var(--wine); }

/* ===== Кнопки ===== */
.btns {
  display: flex;
  justify-content: center;
  margin: 28px 0;
}

.btn {
  padding: 14px 26px;
  border-radius: 16px;
  border: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(120deg, var(--blush), var(--rose));
  color: var(--coffee);
  box-shadow: 0 10px 24px -12px rgba(164, 68, 79, 0.5);
}

.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0); }

/* ===== Результат ===== */
.result {
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  padding: 28px 24px;
  box-shadow:
    0 18px 44px -22px rgba(164, 68, 79, 0.22),
    0 4px 14px -6px rgba(92, 64, 51, 0.12);
  animation: rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--coffee);
  margin-bottom: 18px;
}

.result-table {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(233, 167, 168, 0.35);
}

.rt-head,
.rt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  font-size: 14px;
}

.rt-head {
  background: linear-gradient(120deg, var(--blush), var(--rose));
  color: var(--coffee);
  font-weight: 800;
}

.rt-row:nth-child(even) { background: rgba(255, 255, 255, 0.5); }
.rt-row b { color: var(--wine); }

.rt-total {
  background: var(--wine);
  color: #fff;
  font-weight: 800;
}

.rt-total b { color: #fff; }

/* ===== Вердикт и предупреждения ===== */
.verdict {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(247, 217, 216, 0.6);
  border: 1px solid rgba(233, 167, 168, 0.4);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}

.verdict .lvl {
  display: block;
  font-size: 17px;
  font-weight: 800;
  color: var(--wine);
  margin-bottom: 6px;
}

.warn {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fbeeec;
  border: 1px solid rgba(164, 68, 79, 0.35);
  font-size: 14px;
  color: var(--coffee);
  line-height: 1.5;
}

.src {
  margin-top: 18px;
  color: var(--soft-coffee);
  font-size: 12px;
  line-height: 1.5;
}

/* ===== Мобильная адаптация ===== */
@media (max-width: 480px) {
  .head { padding: 26px 20px; }
  .title { font-size: 24px; }
  .blk { padding: 20px 16px 16px; }
  .item { flex-direction: column; align-items: flex-start; gap: 10px; }
  .toggle { width: 100%; }
  .toggle label { flex: 1; }
}

/* Кнопки-ссылки и ряд кнопок */
a.btn { display: inline-block; text-decoration: none; }
.btns { gap: 12px; flex-wrap: wrap; }
.btn-ghost { background: rgba(255, 255, 255, 0.7); color: var(--wine); border: 1px solid rgba(233, 167, 168, 0.45); }

/* Вторичная кнопка (ссылка или button) в одном стиле с основной */
.btn { transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease, box-shadow 0.2s ease; }
.btn-ghost {
  background: rgba(255, 255, 255, 0.78);
  color: var(--wine);
  border: 1px solid rgba(233, 167, 168, 0.6);
  box-shadow: 0 10px 24px -14px rgba(164, 68, 79, 0.35);
}
.btn-ghost:hover {
  background: linear-gradient(120deg, var(--blush), var(--rose));
  color: var(--coffee);
  transform: translateY(-2px);
}
.btn-ghost:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--deep-rose); outline-offset: 2px; }

/* Отступ между шапкой и первым блоком (раньше там был прогресс-бар) */
.head { margin-bottom: 24px; }
