* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    color: #3d3535;
    background: #faf6f2;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ПЛАВНЫЕ АНИМАЦИИ */
.btn,
.card,
.quiz-btn,
.emotion-btn,
.word-card,
.flags-list li {
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.btn:hover,
.card:hover,
.word-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(61, 53, 53, 0.06);
}

/* КЛИКАБЕЛЬНЫЙ ТЕЛЕФОН */
.phone-link {
    color: #c2787d;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px dashed #d99a9e;
}

.phone-link:hover {
    color: #3d3535;
    border-bottom-style: solid;
}

/* HEADER */
.header {
    background: #fff9f5;
    border-bottom: 1px solid #f0e4dc;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.logo {
    font-weight: 700;
    color: #3d3535;
    text-decoration: none;
    font-size: 1.1rem;
}

.nav {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.nav a {
    color: #8a7a72;
    text-decoration: none;
    font-size: 0.9rem;
}

.nav a:hover {
    color: #d99a9e;
    text-decoration: underline;
}

/* HERO */
.hero {
    background: linear-gradient(135deg, #fce8e6, #faf6f2);
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.2rem;
    line-height: 1.3;
    margin-bottom: 20px;
    color: #3d3535;
}

.hero-sub {
    max-width: 600px;
    margin: 0 auto 30px;
    color: #6b5e58;
}

.btn {
    display: inline-block;
    background: #d99a9e;
    color: #fff;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background: #c9888c;
}

.btn-secondary {
    background: transparent;
    color: #d99a9e;
    border: 1px solid #d99a9e;
    margin-top: 10px;
}

.btn-secondary:hover {
    background: #fce8e6;
}

/* SECTIONS */
.section {
    padding: 60px 0;
}

.section-alt {
    background: #fff9f5;
}

.section h2 {
    font-size: 1.7rem;
    margin-bottom: 20px;
    color: #3d3535;
}

.section p {
    margin-bottom: 15px;
    color: #5a4f49;
}

.hint {
    background: #fdf0e6;
    border-left: 4px solid #e8b4b8;
    padding: 12px 16px;
    margin-top: 20px;
    font-size: 0.95rem;
    border-radius: 0 6px 6px 0;
}

/* CARDS */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.card {
    background: #fff9f5;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #f0e4dc;
}

.section-alt .card {
    background: #faf6f2;
}

.card h3 {
    font-size: 1.05rem;
    margin-bottom: 10px;
    color: #3d3535;
}

.card p {
    font-size: 0.95rem;
    margin: 0;
}

/* QUIZ */
.quiz {
    background: #fff9f5;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #f0e4dc;
    margin-top: 20px;
}

.quiz-question p {
    margin-bottom: 15px;
}

.quiz-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 15px;
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid #e8dcd4;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #3d3535;
}

.quiz-btn:hover {
    border-color: #d99a9e;
}

.quiz-btn.correct {
    background: #e8f4e8;
    border-color: #7cb87c;
}

.quiz-btn.wrong {
    background: #fde8e8;
    border-color: #e57373;
}

.quiz-result {
    margin-top: 15px;
    font-weight: 600;
    color: #3d3535;
}

/* ИНТЕРАКТИВНЫЕ КРАСНЫЕ ФЛАГИ */
.flags-list {
    list-style: none;
    margin-top: 20px;
}

.flags-list li {
    background: #fff9f5;
    padding: 0;
    margin-bottom: 10px;
    border-radius: 6px;
    border: 1px solid #f0e4dc;
    border-left: 4px solid #e8b4b8;
    font-size: 0.95rem;
    cursor: pointer;
}

.flags-list li:hover {
    border-color: #d99a9e;
    background: #fff4f1;
}

.flags-list li.checked {
    background: #fce8e6;
    border-left-color: #d99a9e;
}

.flag-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    width: 100%;
}

.flag-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #d99a9e;
    cursor: pointer;
    flex-shrink: 0;
}

.flags-support {
    margin-top: 20px;
    background: #fce8e6;
    border: 1px solid #e8b4b8;
    border-radius: 8px;
    padding: 20px;
    animation: fadeIn 0.35s ease;
}

.flags-support p {
    margin-bottom: 14px;
    color: #3d3535;
    font-weight: 500;
}

/* СЛОВА, КОТОРЫЕ РАНЯТ */
.words-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.word-card {
    background: #fff9f5;
    padding: 18px;
    border-radius: 8px;
    border: 1px solid #f0e4dc;
}

.word-card.bad {
    border-left: 4px solid #e8b4b8;
}

.word-quote {
    font-weight: 600;
    margin-bottom: 8px;
    color: #3d3535;
}

.word-why {
    font-size: 0.9rem;
    color: #6b5e58;
    margin: 0;
}

/* COMPARE */
.compare {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.compare-item {
    text-align: center;
}

.compare-img {
    height: 180px;
    background: #f0e4dc;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #8a7a72;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

/* ДНЕВНИК */
.diary-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.emotion-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.emotion-btn {
    padding: 8px 14px;
    border: 1px solid #e8dcd4;
    background: #fff;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #3d3535;
}

.emotion-btn:hover {
    border-color: #d99a9e;
}

.emotion-btn.selected {
    background: #fce8e6;
    border-color: #d99a9e;
}

.diary-form textarea {
    padding: 12px;
    border: 1px solid #e8dcd4;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    background: #fff;
    color: #3d3535;
}

.diary-list {
    list-style: none;
    margin-top: 20px;
}

.diary-list li {
    background: #fff9f5;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 6px;
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid #f0e4dc;
}

.diary-list small {
    color: #8a7a72;
    white-space: nowrap;
}

.diary-list li .emotion-tag {
    font-size: 0.8rem;
    color: #8a7a72;
    margin-right: 6px;
}

.diary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.diary-warning {
    background: #fdf0e6;
    border-left: 4px solid #e8b4b8;
    padding: 12px 16px;
    margin-top: 15px;
    border-radius: 0 6px 6px 0;
    font-size: 0.95rem;
}

/* ЧТО САЙТ НЕ ДЕЛАЕТ */
.disclaimer-list {
    list-style: none;
    margin-top: 15px;
}

.disclaimer-list li {
    background: #faf6f2;
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 6px;
    border-left: 4px solid #e8b4b8;
    font-size: 0.95rem;
}

/* FOOTER */
.footer {
    background: #3d3535;
    color: #d9cfc9;
    padding: 25px 0;
    text-align: center;
    font-size: 0.85rem;
}

/* КНОПКА «МНЕ ТЯЖЕЛО СЕЙЧАС» */
.help-now {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #d99a9e;
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 14px 22px;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 200;
    transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.help-now:hover {
    background: #c9888c;
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(217, 154, 158, 0.45);
}

/* МОДАЛЬНОЕ ОКНО */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(61, 53, 53, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
    padding: 20px;
}

.modal-content {
    background: #fff9f5;
    border-radius: 12px;
    padding: 30px;
    max-width: 480px;
    width: 100%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeIn 0.25s ease;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: #8a7a72;
}

.help-list {
    list-style: none;
    margin: 15px 0;
}

.help-list li {
    background: #faf6f2;
    padding: 10px 14px;
    margin-bottom: 8px;
    border-radius: 6px;
    font-size: 0.95rem;
}

/* ПРАКТИКА ЗАЗЕМЛЕНИЯ В МОДАЛКЕ */
.grounding-box {
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid #f0e4dc;
}

.grounding-toggle {
    width: 100%;
    text-align: center;
}

.grounding-widget {
    margin-top: 14px;
    background: #faf6f2;
    border: 1px solid #e8dcd4;
    border-radius: 8px;
    padding: 18px;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.grounding-progress {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8a7a72;
    margin-bottom: 8px;
}

.grounding-widget h3 {
    font-size: 1.05rem;
    color: #3d3535;
    margin-bottom: 8px;
}

.grounding-widget p {
    font-size: 0.9rem;
    color: #6b5e58;
    margin-bottom: 15px;
}

.modal-note {
    font-size: 0.85rem;
    color: #8a7a72;
    margin-top: 15px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
/* ===== МОБИЛЬНАЯ АДАПТАЦИЯ ===== */
@media (max-width: 768px) {
.hero {
padding: 50px 0;
}
.hero h1 {
font-size: 1.7rem;
}
.section {
padding: 40px 0;
}
.section h2 {
font-size: 1.4rem;
}
.header .container {
flex-direction: column;
align-items: flex-start;
gap: 12px;
}
.nav {
width: 100%;
gap: 8px 14px;
}
.nav a {
font-size: 0.85rem;
}
}
@media (max-width: 480px) {
.container {
padding: 0 15px;
}
.hero {
padding: 40px 0;
}
.hero h1 {
font-size: 1.45rem;
}
.hero-sub {
font-size: 0.95rem;
}
.section {
padding: 35px 0;
}
.section h2 {
font-size: 1.25rem;
}
.card {
padding: 16px;
}
.quiz {
padding: 18px;
}
.quiz-btn {
padding: 10px 12px;
font-size: 0.9rem;
}
.diary-list li {
flex-direction: column;
align-items: flex-start;
gap: 4px;
}
.btn {
width: 100%;
text-align: center;
}
.compare-img {
height: 140px;
}
.help-now {
bottom: 15px;
right: 15px;
padding: 12px 18px;
font-size: 0.9rem;
}
.modal-content {
padding: 22px;
}
}
/* Модалка, управляемая атрибутом hidden */
.modal[hidden] {
  display: none;
}

/* Активный вопрос квиза (в HTML теперь класс, а не inline display) */
.quiz-question {
  display: none;
}
.quiz-question.is-active {
  display: block;
}
.quiz-btn:disabled {
  cursor: default;
  opacity: 0.9;
}

/* Футер: список «Что сайт НЕ делает» */
.footer {
  text-align: left;
}
.footer h2 {
  color: #fff9f5;
  font-size: 1.3rem;
  margin-bottom: 15px;
}
.footer-list {
  list-style: none;
  margin: 0 0 15px;
  padding: 0;
}
.footer-list li {
  background: rgba(255, 255, 255, 0.06);
  padding: 10px 14px;
  margin-bottom: 8px;
  border-radius: 6px;
  border-left: 3px solid #d99a9e;
  font-size: 0.9rem;
}
.footer p {
  margin-bottom: 10px;
  font-size: 0.85rem;
}
.footer-note {
  color: #b8aaa2;
}

/* Плавающая кнопка «Мне сейчас тяжело» (в HTML класс .help-fab) */
.help-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #d99a9e;
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 14px 22px;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 200;
  transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}
.help-fab:hover {
  background: #c9888c;
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(217, 154, 158, 0.45);
}

/* Дневник: кнопки настроения (.mood-btn вместо .emotion-btn) */
.mood-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 10px;
}
.mood-btn {
  padding: 8px 14px;
  border: 1px solid #e8dcd4;
  background: #fff;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #3d3535;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.mood-btn:hover {
  border-color: #d99a9e;
  transform: translateY(-1px);
}
.mood-btn.selected {
  background: #fce8e6;
  border-color: #d99a9e;
}

/* Поле заметки в дневнике (если добавишь <textarea id="diaryNote">) */
.diary-note {
  width: 100%;
  padding: 12px;
  border: 1px solid #e8dcd4;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  background: #fff;
  color: #3d3535;
  margin-bottom: 12px;
}

/* Мобильная адаптация для новых элементов */
@media (max-width: 480px) {
  .help-fab {
    bottom: 15px;
    right: 15px;
    padding: 12px 18px;
    font-size: 0.9rem;
  }
  .mood-buttons {
    gap: 6px;
  }
  .mood-btn {
    font-size: 0.85rem;
    padding: 7px 12px;
  }
  .footer-list li {
    font-size: 0.85rem;
  }
}

/* Доступность: видимый фокус */
.btn:focus-visible,
.quiz-btn:focus-visible,
.mood-btn:focus-visible,
.help-fab:focus-visible,
.modal-close:focus-visible,
.flag-checkbox:focus-visible {
  outline: 2px solid #d99a9e;
  outline-offset: 2px;
}