/* ============================================================
   HERO — CLS-фикс
   ============================================================ */
.hero-photo {
    position: relative;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    margin-top: calc(var(--header-height, 95px) + 30px);
}
.hero-photo-inner {
    position: relative;
    width: 100%;
    max-width: 1232px;
    margin: 0 auto;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 44px rgba(212, 175, 55, 0.10);
    background: #0a0a1a;
    aspect-ratio: 16/7;
    min-height: 320px;
    contain: layout size;
}
.hero-photo-inner img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-photo-inner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 10, 26, 0.94) 0%, rgba(10, 10, 26, 0.72) 28%, rgba(10, 10, 26, 0.32) 55%, rgba(10, 10, 26, 0.10) 78%, rgba(10, 10, 26, 0.35) 100%);
    pointer-events: none;
}
.hero-photo-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 36px 40px 38px;
    text-align: center;
    z-index: 2;
}

@media (max-width: 768px) {
    .hero-photo { margin-top: calc(var(--header-height, 95px) + 14px); padding: 0 12px; }
    .hero-photo-inner { border-radius: 18px; aspect-ratio: 16/8; min-height: 260px; }
    .hero-photo-content { padding: 24px 16px 22px; }
}

.r-section-divider {
    font-family: 'Arial', 'Helvetica', sans-serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--highlight);
    text-align: center;
    margin: 3rem 0 1rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(0, 183, 194, 0.4);
    letter-spacing: 2px;
    text-transform: uppercase;
    clear: both;
}
.r-section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: #111;
    text-align: center;
    margin: 1.5rem 0 1rem;
    clear: both;
}
.r-chapter-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #111;
    margin: 1.2rem 0 0.5rem;
    text-align: center;
    clear: both;
}
.r-chapter-subtitle {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111111;
    margin-top: 1.2rem;
    margin-bottom: 0.3rem;
    text-align: center;
    clear: both;
}
.r-chapter-subsubtitle {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2a2a2a;
    margin-bottom: 0.4rem;
    text-align: center;
    clear: both;
}
@media (max-width: 768px) {
    .r-section-divider { font-size: 2.2rem; }
    .r-section-title { font-size: 2rem; }
    .r-chapter-title { font-size: 1.5rem; }
    .r-chapter-subtitle { font-size: 1.2rem; }
    .r-chapter-subsubtitle { font-size: 1.0rem; }
}

.warning-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 1.5rem auto 1.8rem;
    padding: 1rem 1.5rem;
    border: 2px solid rgba(255, 71, 87, 0.55);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.12), rgba(255, 71, 87, 0.04));
    max-width: 640px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(255, 71, 87, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: rmzWarningPulse 2.4s ease-in-out infinite;
}
.warning-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 71, 87, 0.75), transparent);
    pointer-events: none;
}
.warning-header .warning-icon {
    font-size: 1.8rem;
    line-height: 1;
    animation: rmzWarningIcon 1.6s ease-in-out infinite;
}
.warning-header .warning-text {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1rem, 2.4vw, 1.35rem);
    font-weight: 800;
    color: #ff6b6b;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-shadow: 0 0 14px rgba(255, 71, 87, 0.35);
    white-space: nowrap;
}
@keyframes rmzWarningPulse {
    0%, 100% { box-shadow: 0 0 30px rgba(255, 71, 87, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.05); }
    50% { box-shadow: 0 0 45px rgba(255, 71, 87, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
}
@keyframes rmzWarningIcon {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.12) rotate(-6deg); }
}
@media (max-width: 480px) {
    .warning-header {
        padding: 0.8rem 0.9rem;
        gap: 10px;
        margin: 1rem auto 1.3rem;
    }
    .warning-header .warning-icon { font-size: 1.4rem; }
    .warning-header .warning-text {
        font-size: 0.86rem;
        letter-spacing: 0.04em;
        white-space: normal;
    }
}
@media (prefers-reduced-motion: reduce) {
    .warning-header,
    .warning-header .warning-icon { animation: none !important; }
}

.book-header {
    max-width: 900px;
    margin: 0 auto 20px;
    padding: 0;
    position: relative;
    z-index: 10;
    text-align: center;
}

.toc-float-btn {
    display: none;
    position: fixed;
    bottom: calc(30px + env(safe-area-inset-bottom, 0px));
    right: 20px;
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.6rem;
    cursor: pointer;
    z-index: 3000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--highlight), #0f4c75);
}
.toc-float-btn:hover { transform: scale(1.05); }
@media (max-width: 1024px) { .toc-float-btn { display: flex; } }

.search-float-btn {
    display: none;
    position: fixed;
    bottom: calc(30px + env(safe-area-inset-bottom, 0px));
    left: 20px;
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.6rem;
    cursor: pointer;
    z-index: 3000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #D4AF37, #b8860b);
}
.search-float-btn:hover { transform: scale(1.05); }
@media (max-width: 1024px) { .search-float-btn { display: flex; } }

.chapter-wrapper { position: relative; }

.dictionary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin: 1.5rem 0;
    max-width: 100%;
    clear: both;
}
.dict-item {
    border-radius: 8px;
    padding: 0.6rem 0.8rem 0.8rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    word-break: normal;
    overflow: hidden;
    min-height: 0 !important;
}
.dict-item:hover { border-color: #D4AF37; transform: translateY(-2px); }
.dict-term {
    font-weight: 700;
    color: #D4AF37;
    font-size: 0.85rem;
    margin-bottom: 0.15rem;
    font-family: 'Arial', sans-serif;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.dict-def {
    font-size: 0.8rem;
    color: #444;
    line-height: 1.4;
    font-family: 'Times New Roman', Times, serif;
    flex: 1 1 auto;
    position: relative;
    z-index: 1;
}
.dict-section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--highlight);
    text-align: left;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(0, 183, 194, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    grid-column: 1 / -1;
    clear: both;
}
.dict-item > .rmz-share-actions {
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    gap: 6px !important;
    margin: 6px 0 2px !important;
    padding: 0 !important;
    margin-top: auto !important;
}
.dict-item .rmz-action-btn {
    flex: 1 1 0 !important;
    max-width: none !important;
    min-width: 0 !important;
    width: auto !important;
    min-height: 26px !important;
    height: 26px !important;
    padding: 3px 8px !important;
    font-size: 0.62rem !important;
    gap: 4px !important;
    line-height: 1 !important;
}
@media (max-width: 768px) {
    .dictionary-grid { grid-template-columns: 1fr; }
    .dict-section-title { font-size: 1.2rem; }
    .dict-item .rmz-action-btn {
        font-size: 0.6rem !important;
        padding: 3px 6px !important;
        height: 26px !important;
        min-height: 26px !important;
    }
}

.toast {
    position: fixed;
    bottom: calc(30px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    background: #0a0a1a;
    color: #00b7c2;
    padding: 10px 24px;
    border-radius: 50px;
    font-family: Arial, sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    z-index: 9999;
    border: 1px solid rgba(0, 183, 194, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.toast.show { opacity: 1; }
.loading-indicator {
    text-align: center;
    padding: 20px;
    color: #999;
    font-family: Arial, sans-serif;
    font-size: 0.9rem;
    display: none;
}
.loading-indicator .spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #eee;
    border-top-color: #00b7c2;
    border-radius: 50%;
    animation: rmzSpinLoading 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}
@keyframes rmzSpinLoading { to { transform: rotate(360deg); } }

.image-modal .modal-close {
    position: absolute;
    top: 20px; right: 20px;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: rgba(255, 71, 87, 0.15);
    border: 2px solid #ff4757;
    color: #ff4757;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 20001;
}
.image-modal .modal-close:hover {
    background: #ff4757;
    color: white;
    transform: rotate(90deg) scale(1.1);
}
.image-modal img {
    max-width: 100vw;
    max-height: 100vh;
    width: auto; height: auto;
    object-fit: contain;
    border-radius: 12px;
    border: 2px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s ease;
    touch-action: pan-x pan-y;
    cursor: pointer;
}
html.rmz-image-modal-open,
body.rmz-image-modal-open { overflow: hidden !important; }
.image-modal { overscroll-behavior: contain !important; }

.people-block {
    text-align: center;
}
.people-block img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #d4af37;
    display: block;
    margin: 0 auto 1rem;
}
.people-block p {
    text-align: center;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
    font-style: italic;
    color: #111;
    margin: 0;
}
.pre-wait-quote {
    text-align: center;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    font-style: italic;
    line-height: 1.7;
    color: #111;
    padding: 1.8rem 1.5rem;
}

.seo-noscript {
    max-width: 750px;
    margin: 2rem auto;
    padding: 1.5rem 1.8rem;
    background: #fffdf7;
    border: 1px solid rgba(184, 134, 11, 0.28);
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(28, 23, 10, 0.08);
    font-family: 'Times New Roman', Times, serif;
    color: #111;
    line-height: 1.65;
}
.seo-noscript p { margin: 0 0 0.8rem; }
.seo-noscript p:last-child { margin-bottom: 0; }
.seo-noscript strong {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
    color: #8F6B12;
    display: block;
    margin-bottom: 0.5rem;
}

.rmz-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: auto;
    max-width: 100%;
    min-width: 0;
    padding: 8px 14px;
    min-height: 34px;
    box-sizing: border-box;
    border: 1px solid rgba(159, 116, 16, 0.50);
    border-radius: 999px;
    background: linear-gradient(180deg, #F7E7A4 0%, #DEC568 52%, #C5A73D 100%);
    color: #5B4710;
    font: 600 0.76rem/1 system-ui, -apple-system, sans-serif;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 3px 10px rgba(120, 90, 20, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
    transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.rmz-action-btn:hover,
.rmz-action-btn:focus-visible {
    background: linear-gradient(180deg, #F9ECB7 0%, #E5CF7A 52%, #CBB04F 100%);
    box-shadow: 0 4px 11px rgba(120, 90, 20, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.62);
    outline: none;
}
.rmz-action-btn:disabled { opacity: 0.65; cursor: wait; }
@media (max-width: 768px) {
    .rmz-action-btn { font-size: 0.7rem; padding: 7px 12px; min-height: 32px; }
}
@media (max-width: 480px) {
    .rmz-action-btn { font-size: 0.66rem; padding: 6px 10px; min-height: 30px; }
}

/* ============================================================
   BOOK COLLAB BLOCK — единый стиль (бирюза + зажигание)
   ============================================================ */
.book-collab-block {
    max-width: 750px;
    margin: 2.5rem auto 0;
    padding: 1.5rem 1.5rem 1.5rem;
    text-align: center;
    border-top: 1px solid rgba(184, 134, 11, 0.22);
    border-bottom: 1px solid rgba(184, 134, 11, 0.22);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: .5rem;
    clear: both;
}
.book-collab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 14px;
    font-family: system-ui, sans-serif;
    font-size: 0.96rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    border: 1px solid rgba(127, 246, 247, 0.45);
    transition: 0.24s ease;
    min-height: 54px;
    background: linear-gradient(135deg, #00c5cf 0%, #1a7f9e 50%, #0f4c75 100%);
    color: #fff;
    box-shadow:
        0 10px 26px rgba(0,197,207,.32),
        0 0 20px rgba(0,197,207,.15),
        inset 0 1px 0 rgba(255,255,255,.18);
    text-decoration: none;
    min-width: 0;
    width: auto;
}
.book-collab-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 14px 34px rgba(0,197,207,.45),
        0 0 32px rgba(0,197,207,.28),
        inset 0 1px 0 rgba(255,255,255,.25);
    border-color: rgba(127, 246, 247, 0.9);
    filter: brightness(1.06);
}
@media (max-width: 700px) {
    .book-collab-block {
        padding: 1.2rem 1rem 1.2rem;
        margin-top: 2rem;
        gap: .5rem;
    }
    .book-collab-btn {
        padding: 12px 22px;
        font-size: 0.88rem;
        min-height: 48px;
        width: 100%;
        max-width: 340px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .warning-header,
    .warning-header::before,
    .warning-header .warning-icon,
    .warning-header .warning-text { animation: none !important; }
    .rmz-export-spinner-logo { animation: none !important; }
    .loader-logo { animation: none !important; }
    .loader-text { animation: none !important; }
    .loading-indicator .spinner { animation: none !important; }
    .book-collab-btn { transition: none !important; }
}

@media (max-width: 768px) {
    .hero-photo-inner {
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35) !important;
    }
    .btn-primary {
        box-shadow: 0 6px 18px rgba(0, 197, 207, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    }
    .btn-primary:hover {
        transform: none;
        box-shadow: 0 6px 18px rgba(0, 197, 207, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
    }
    .toc-float-btn,
    .search-float-btn,
    .pc-search-toggle {
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28) !important;
    }
    .toast {
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3) !important;
    }
}

.hero-read-hint{
  display:block;
  margin-top:.6rem;
  font:italic 400 .82rem/1.4 system-ui,-apple-system,sans-serif;
  color:rgba(224,236,240,.55);
  text-align:center;
  letter-spacing:.01em;
}
@media(max-width:700px){
  .hero-read-hint{font-size:.74rem;margin-top:.5rem}
}

/* ============================================================
   ГЛАВА 15 — Формула успеха (с квадратными скобками)
   ============================================================ */
.formula-block.protected-paper{
  position: relative;
  max-width: 1000px;
  margin: 2rem auto;
  padding: 2rem 1.5rem 1.5rem;
  border: none;
  border-radius: 20px;
  background:
    radial-gradient(circle at 0 0, rgba(212, 175, 55, 0.06), transparent 50%),
    linear-gradient(145deg, #fffdf7, #f8f6f0);
  background-image:
    var(--rmz-watermark),
    radial-gradient(circle at 0 0, rgba(212, 175, 55, 0.06), transparent 50%),
    linear-gradient(145deg, #fffdf7, #f8f6f0);
  background-size: 280px 280px, auto, auto;
  background-repeat: repeat, no-repeat, no-repeat;
  box-shadow: 0 0 0 1px rgba(184, 134, 11, 0.32);
  text-align: center;
  clear: both;
  overflow: visible;
}
.formula-block.protected-paper::before{
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #D4AF37, transparent);
  pointer-events: none;
  border-radius: 20px 20px 0 0;
}

.formula-grid{
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0.6rem;
  margin: 0 auto 1.25rem;
  flex-wrap: nowrap;
  padding: 8px 12px;
  max-width: 100%;
  overflow: visible;
}

.formula-group{
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0.55rem;
  padding: 0 1.1rem;
}

.formula-item{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.1rem 0.9rem;
  border: 1px solid rgba(184, 134, 11, 0.22);
  border-radius: 16px;
  background: #fffdf7;
  box-shadow: 0 6px 16px rgba(28, 23, 10, 0.05);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  text-align: center;
  min-width: 180px;
  max-width: 240px;
  flex: 1 1 0;
}
.formula-item:hover{
  transform: translateY(-3px);
  border-color: rgba(212, 175, 55, 0.55);
  box-shadow: 0 12px 28px rgba(28, 23, 10, 0.1);
}

.formula-icon{
  font-size: 2.2rem;
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(212, 175, 55, 0.2));
}
.formula-name{
  font: 700 1.15rem/1.2 'Playfair Display', Georgia, serif;
  color: #8F6B12;
  letter-spacing: -0.01em;
}
.formula-desc{
  font: 400 0.84rem/1.5 'Times New Roman', Times, serif;
  color: #555555;
  max-width: 200px;
}

.formula-sign{
  display: grid;
  place-items: center;
  font: 700 1.8rem/1 'Playfair Display', Georgia, serif;
  color: #D4AF37;
  padding: 0 0.15rem;
  align-self: center;
  text-shadow: 0 2px 8px rgba(212, 175, 55, 0.35);
  flex-shrink: 0;
}

.formula-equals{
  font: 900 2rem/1 'Playfair Display', Georgia, serif;
  color: #8F6B12;
  margin: 0.6rem 0 1rem;
  text-shadow: 0 2px 8px rgba(212, 175, 55, 0.35);
}

.formula-result{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1.25rem 2rem 1.15rem;
  margin: 0 auto;
  border: 2px solid rgba(212, 175, 55, 0.5);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 217, 102, 0.25), rgba(212, 175, 55, 0.12));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  text-align: center;
  overflow: visible;
}
.formula-result-icon{
  font-size: 2.4rem;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(212, 175, 55, 0.5));
}
.formula-result-name{
  font: 900 1.5rem/1.1 'Playfair Display', Georgia, serif;
  color: #8F6B12;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.formula-result-desc{
  font: 400 0.86rem/1.45 'Times New Roman', Times, serif;
  color: #5B4710;
  max-width: 320px;
}

.formula-block .rmz-share-actions{
  margin-top: 1.4rem;
  justify-content: center;
}

/* ============================================================
   ГЛАВА 15 — Формула успеха
   Внутри .quote-wrapper.protected-paper
   ============================================================ */
.formula-body{
  display: block;
  width: 100%;
  padding: 0.5rem 0 0.75rem;
  position: relative;
  z-index: 1;
}

.formula-row{
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  margin-bottom: 0.4rem;
}

.formula-group{
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0.45rem;
  flex-wrap: nowrap;
  min-width: 0;
}

.formula-bracket{
  display: block;
  width: 14px;
  min-width: 14px;
  align-self: stretch;
  flex-shrink: 0;
  font-size: 0;
  line-height: 0;
  color: transparent;
  position: relative;
  pointer-events: none;
  user-select: none;
}
.formula-bracket::before{
  content: '';
  position: absolute;
  top: -6px;
  bottom: -6px;
  left: 0;
  right: 0;
  border: 3px solid #8F6B12;
  border-radius: 3px;
}
.formula-bracket--left::before{
  border-right: none;
  border-radius: 4px 0 0 4px;
}
.formula-bracket--right::before{
  border-left: none;
  border-radius: 0 4px 4px 0;
}

.formula-cell{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 0.75rem;
  border: 1px solid rgba(184, 134, 11, 0.28);
  border-radius: 14px;
  background: #fffdf7;
  box-shadow: 0 4px 12px rgba(28, 23, 10, 0.05);
  text-align: center;
  min-width: 150px;
  max-width: 210px;
  flex: 1 1 0;
}

.formula-cell--result{
  border: 2px solid rgba(212, 175, 55, 0.55);
  background: linear-gradient(135deg, rgba(255, 217, 102, 0.28), rgba(212, 175, 55, 0.1));
  min-width: 220px;
  max-width: 300px;
}

.formula-icon{ font-size: 1.8rem; line-height: 1; }
.formula-name{ font: 700 1.05rem/1.2 'Playfair Display', Georgia, serif; color: #8F6B12; letter-spacing: -0.01em; }
.formula-desc{ font: 400 0.78rem/1.45 'Times New Roman', Times, serif; color: #555555; }
.formula-op{ display: grid; place-items: center; font: 700 1.5rem/1 'Playfair Display', Georgia, serif; color: #D4AF37; align-self: center; padding: 0 0.15rem; user-select: none; flex-shrink: 0; }
.formula-op--big{ font-size: 2rem; }
.formula-equals-row{ display: block; text-align: center; font: 900 2rem/1 'Playfair Display', Georgia, serif; color: #8F6B12; margin: 0.5rem 0 0.75rem; text-shadow: 0 2px 8px rgba(212, 175, 55, 0.35); }
.formula-result-row{ display: flex; justify-content: center; }

/* ============================================================
   МОБИЛЬНЫЙ ВИД (Телефоны) — Вертикальная стопка со скобками
   ============================================================ */
@media (max-width: 700px){
  
  /* 1. Прячем старые обертки, чтобы они не мешали колонке */
  .formula-row,
  .formula-group,
  .formula-result-row {
    display: contents !important;
  }

  /* 2. Главный контейнер — обычная колонка сверху вниз */
  .formula-body {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.6rem !important;
    padding: 0 0.5rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* 3. ВЕРХНИЙ РЯД: Игра + Дисциплина. 
        Используем Grid только для этой группы, чтобы вернуть скобки */
  .formula-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 340px !important;
    gap: 0.3rem !important;
    margin-bottom: 0.2rem !important;
  }

  /* Показываем скобки обратно */
  .formula-bracket {
    display: block !important;
    width: 10px !important;
    min-width: 10px !important;
  }
  .formula-bracket::before {
    top: -4px !important;
    bottom: -4px !important;
    border-width: 2.5px !important;
  }
  .formula-bracket--left::before { border-radius: 3px 0 0 3px !important; }
  .formula-bracket--right::before { border-radius: 0 3px 3px 0 !important; }

  /* Карточки Игры и Дисциплины в этом ряду */
  .formula-group .formula-cell {
    min-width: 0 !important;
    flex: 1 1 0 !important;
    padding: 0.6rem 0.3rem !important;
  }

  /* Плюс между ними оставляем видимым */
  .formula-group .formula-op {
    display: grid !important;
    font-size: 1.3rem !important;
    padding: 0 !important;
  }

  /* 4. Знак умножения (×) — по центру */
  .formula-op--big { 
    display: block !important;
    text-align: center !important;
    font-size: 1.8rem !important;
    color: #D4AF37 !important;
    margin: 0.2rem 0 !important;
    line-height: 1 !important;
  }

  /* 5. Тишина — по центру, чуть шире */
  .formula-cell:nth-of-type(3) { 
    width: 100% !important; 
    max-width: 280px !important;
    margin: 0 auto !important;
    padding: 0.7rem 0.4rem !important;
  }

  /* 6. Знак равно (=) */
  .formula-equals-row { 
    display: block !important;
    text-align: center !important;
    font-size: 1.6rem !important;
    color: #8F6B12 !important;
    margin: 0.2rem 0 !important;
    line-height: 1 !important;
  }

  /* 7. Успех — по центру, чуть шире */
  .formula-cell--result { 
    width: 100% !important; 
    max-width: 280px !important;
    margin: 0 auto !important;
    padding: 0.7rem 0.4rem !important;
  }

  /* 8. Шрифты внутри карточек на мобильном */
  .formula-icon { font-size: 1.3rem !important; margin-bottom: 0.1rem !important; }
  .formula-name { font-size: 0.8rem !important; line-height: 1.1 !important; }
  .formula-desc { font-size: 0.62rem !important; line-height: 1.3 !important; margin: 0 !important; }
}

/* Для очень узких экранов (iPhone SE и т.д.) */
@media (max-width: 380px) {
  .formula-group { gap: 0.2rem !important; }
  .formula-cell { padding: 0.5rem 0.2rem !important; }
  .formula-name { font-size: 0.75rem !important; }
  .formula-desc { font-size: 0.55rem !important; }
  .formula-cell:nth-of-type(3), .formula-cell--result { max-width: 240px !important; }
}

/* ============================================================
   БЛОК «КОГДА МЕЛОДИЯ УЖЕ ЗВУЧИТ В ГОЛОВЕ» (глава 10)
   ============================================================ */
.voice-quote{
  max-width:750px;
  text-align:center;
  padding:1.8rem 1.5rem 1.5rem;
}
.voice-quote__badge{
  display:inline-flex;
  align-items:center;
  gap:.55rem;
  margin:0 0 1.2rem;
  color:rgba(143,107,18,.85);
  font:800 .58rem/1 system-ui,-apple-system,sans-serif;
  letter-spacing:.18em;
  text-transform:uppercase;
}
.voice-quote__icon{
  display:grid;
  place-items:center;
  width:28px;height:28px;min-width:28px;
  border:1px solid rgba(143,107,18,.3);
  border-radius:50%;
  background:rgba(212,175,55,.08);
  color:#8F6B12;
  font-size:.95rem;line-height:1;
}
.voice-quote__wave{
  width:100%;
  height:60px;
  margin:0 0 1.2rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:2px;
  overflow:hidden;
  opacity:.75;
}
.voice-quote__wave i{
  display:block;
  flex:0 0 3px;
  width:3px;
  height:var(--h,30%);
  border-radius:99px;
  background:linear-gradient(180deg,rgba(143,107,18,.75),rgba(212,175,55,.2));
  box-shadow:0 0 6px rgba(212,175,55,.15);
  transform-origin:center;
}
.voice-quote__wave i:nth-child(3n){--h:48%}
.voice-quote__wave i:nth-child(4n){--h:72%}
.voice-quote__wave i:nth-child(5n){--h:88%}
.voice-quote__wave i:nth-child(7n){--h:57%}
.voice-quote__wave i:nth-child(8n){--h:35%}
.voice-quote__wave i:nth-child(11n){--h:68%}
.voice-quote__wave i:nth-child(13n){--h:94%}
.voice-quote__wave i:nth-child(17n){--h:45%}
.voice-quote__lead{
  margin:0 0 .9rem;
  font-family:'Playfair Display',Georgia,serif;
  font-size:1.1rem;
  font-style:italic;
  line-height:1.6;
  color:#111;
  text-align:center;
}
.voice-quote__lead b{font-weight:700;font-style:normal}
.voice-quote__text{
  margin:0 0 1.3rem;
  font-family:'Times New Roman',Times,serif;
  font-size:1rem;
  line-height:1.7;
  color:#333;
  text-align:center;
}
.voice-quote__text strong{color:#111;font-weight:700}
.voice-quote__formula{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.55rem;
  flex-wrap:wrap;
  color:rgba(120,100,50,.7);
  font:800 .68rem/1 system-ui,-apple-system,sans-serif;
  letter-spacing:.12em;
}
.voice-quote__formula b{
  color:#8F6B12;
  font-weight:500;
}
.voice-quote__idea{
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  padding:.4rem .75rem;
  border:1px solid rgba(143,107,18,.35);
  border-radius:999px;
  background:rgba(212,175,55,.08);
  color:#8F6B12;
  font:800 .68rem/1 system-ui,-apple-system,sans-serif;
  letter-spacing:.12em;
  cursor:pointer;
  transition:all .22s ease;
}
.voice-quote__idea:hover{
  transform:translateY(-1px);
  border-color:rgba(143,107,18,.7);
  background:rgba(212,175,55,.16);
}
.voice-quote__mic{font-size:.85rem;line-height:1}

@media(max-width:700px){
  .voice-quote{padding:1.4rem 1.1rem 1.2rem}
  .voice-quote__wave{height:50px;gap:1.5px;margin-bottom:1rem}
  .voice-quote__wave i{flex:0 0 2px;width:2px}
  .voice-quote__lead{font-size:1rem}
  .voice-quote__text{font-size:.92rem}
  .voice-quote__formula{font-size:.6rem}
  .voice-quote__idea{font-size:.6rem;padding:.34rem .6rem}
}

/* ============================================================
   КНОПКА ПОИСКА И КНОПКА "ВВЕРХ" НА ПК
   ============================================================ */
.pc-search-toggle {
    display: none;
    position: fixed;
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1.6rem;
    cursor: pointer;
    z-index: 1999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #D4AF37, #b8860b);
}
.pc-search-toggle:hover { transform: scale(1.05); }

@media (min-width: 1025px) {
    .pc-search-toggle {
        display: flex;
        bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
        left: 30px !important;
        right: auto !important;
    }
    .scroll-top-btn,
    .rmz-scroll-top,
    .back-to-top {
        bottom: 105px !important; /* 30 (поиск) + 60 (высота поиска) + 15 (зазор) */
        right: 30px !important;
    }
}

/* ============================================================
   ★ БЛОК «КОГДА МЕЛОДИЯ УЖЕ ЗВУЧИТ В ГОЛОВЕ» — красивое оформление
   ============================================================ */
.voice-quote {
    max-width: 750px;
    margin: 2rem auto;
    padding: 0;
    text-align: center;
    border-radius: 18px;
    overflow: hidden;
    background-color: #fffdf7;
    border: 1px solid rgba(184, 134, 11, 0.28);
    box-shadow: 0 10px 30px rgba(28, 23, 10, 0.08);
}

/* Шапка: фото + «Музыкальный Архитектор» + иконка */
.voice-quote__header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 20px;
    background: linear-gradient(135deg, #fffdf7, #f9f4e6);
    border-bottom: 1px solid rgba(184, 134, 11, 0.18);
    position: relative;
}
.voice-quote__header img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #D4AF37;
    box-shadow: 0 0 14px rgba(212, 175, 55, 0.3);
    flex-shrink: 0;
}
.voice-quote__header-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 2px;
}
.voice-quote__header-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #8F6B12;
    line-height: 1.2;
    letter-spacing: 0.02em;
}
.voice-quote__header-role {
    font-family: 'Arial', sans-serif;
    font-size: 0.68rem;
    color: rgba(120, 100, 50, 0.65);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Бейдж «КОГДА МЕЛОДИЯ УЖЕ ЗВУЧИТ В ГОЛОВЕ» */
.voice-quote__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 1.4rem 0 0.8rem;
    padding: 0.5rem 1rem;
    color: #8F6B12;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    border: 1px solid rgba(143, 107, 18, 0.32);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 217, 102, 0.14), rgba(255, 255, 255, 0.5));
    position: relative;
    z-index: 1;
}
.voice-quote__badge::before,
.voice-quote__badge::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(143, 107, 18, 0.55));
}
.voice-quote__badge::before {
    right: 100%;
    margin-right: 12px;
    transform: scaleX(-1);
}
.voice-quote__badge::after {
    left: 100%;
    margin-left: 12px;
}
.voice-quote__icon {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    border: 1px solid rgba(143, 107, 18, 0.4);
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.15);
    color: #8F6B12;
    font-size: 0.85rem;
    line-height: 1;
}

/* Волна */
.voice-quote__wave {
    width: 100%;
    height: 50px;
    margin: 0 0 1.2rem;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2px;
    overflow: hidden;
    opacity: 0.75;
    box-sizing: border-box;
}
.voice-quote__wave i {
    display: block;
    flex: 0 0 3px;
    width: 3px;
    height: var(--h, 30%);
    border-radius: 99px;
    background: linear-gradient(180deg, rgba(143, 107, 18, 0.75), rgba(212, 175, 55, 0.2));
}

/* Текст */
.voice-quote__lead {
    margin: 0 1.5rem 0.9rem;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.05rem;
    font-style: italic;
    line-height: 1.6;
    color: #111;
}
.voice-quote__text {
    margin: 0 1.5rem 1.3rem;
    font-family: 'Times New Roman', Times, serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #333;
}

/* Формула «ИДЕЯ → МУЗЫКА → ТРЕК» */
.voice-quote__formula {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    padding: 0 1.5rem 1.6rem;
    color: rgba(120, 100, 50, 0.7);
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}
.voice-quote__formula b {
    color: #8F6B12;
    font-weight: 500;
}
.voice-quote__idea {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    border: 1px solid rgba(143, 107, 18, 0.4);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 217, 102, 0.25), rgba(255, 255, 255, 0.6));
    color: #8F6B12;
    font: 800 0.68rem/1 system-ui, -apple-system, sans-serif;
    letter-spacing: 0.12em;
    cursor: pointer;
    transition: all 0.22s ease;
}
.voice-quote__idea:hover {
    transform: translateY(-1px);
    border-color: rgba(143, 107, 18, 0.8);
    background: linear-gradient(135deg, rgba(255, 217, 102, 0.4), rgba(255, 255, 255, 0.8));
}

@media (max-width: 700px) {
    .voice-quote { margin: 1.5rem auto; border-radius: 14px; }
    .voice-quote__header { padding: 14px 16px; gap: 10px; }
    .voice-quote__header img { width: 40px; height: 40px; }
    .voice-quote__header-name { font-size: 0.95rem; }
    .voice-quote__header-role { font-size: 0.6rem; }
    .voice-quote__badge { font-size: 0.72rem; padding: 0.4rem 0.8rem; margin: 1.2rem 0 0.7rem; }
    .voice-quote__badge::before,
    .voice-quote__badge::after { width: 20px; }
    .voice-quote__wave { height: 40px; padding: 0 1rem; }
    .voice-quote__wave i { flex: 0 0 2px; width: 2px; }
    .voice-quote__lead { font-size: 0.98rem; margin: 0 1rem 0.7rem; }
    .voice-quote__text { font-size: 0.92rem; margin: 0 1rem 1rem; }
    .voice-quote__formula { padding: 0 1rem 1.2rem; font-size: 0.6rem; }
    .voice-quote__idea { font-size: 0.6rem; padding: 0.4rem 0.7rem; }
}

/* ═══════════════════════════════════════════════════════════
   LOGO-TOAST — кнопка «База Знаний» в АКТИВНОМ стиле навбара
   (бирюзовый градиент, свечение, как .nav-knowledge.active)
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 1025px) {
  .logo-toast-btn.logo-toast-btn--knowledge {
    background:
      radial-gradient(circle at 30% 20%, rgba(160, 235, 240, .28), transparent 60%),
      linear-gradient(135deg,
        rgba(0, 205, 215, .42) 0%,
        rgba(0, 150, 175, .34) 55%,
        rgba(15, 76, 117, .44) 100%);
    border: 1px solid rgba(127, 246, 247, .72);
    color: #fff;
    box-shadow:
      0 0 18px rgba(0, 197, 207, .32),
      0 0 38px rgba(0, 183, 194, .18),
      inset 0 1px 0 rgba(200, 250, 255, .32),
      inset 0 0 22px rgba(160, 235, 240, .10);
    text-shadow: 0 0 6px rgba(180, 245, 250, .55), 0 1px 2px rgba(0, 40, 55, .35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  .logo-toast-btn.logo-toast-btn--knowledge:hover,
  .logo-toast-btn.logo-toast-btn--knowledge:focus-visible {
    background:
      radial-gradient(circle at 30% 20%, rgba(180, 245, 250, .36), transparent 60%),
      linear-gradient(135deg,
        rgba(0, 225, 235, .52) 0%,
        rgba(0, 165, 190, .42) 55%,
        rgba(20, 90, 135, .52) 100%);
    border-color: rgba(180, 250, 255, .95);
    color: #fff;
    transform: translateY(-2px);
    box-shadow:
      0 0 24px rgba(0, 197, 207, .45),
      0 0 50px rgba(0, 183, 194, .26),
      inset 0 1px 0 rgba(220, 255, 255, .4),
      inset 0 0 26px rgba(160, 235, 240, .14);
  }

  .logo-toast-btn.logo-toast-btn--knowledge:active {
    transform: translateY(0);
  }
}

/* ============================================================
   Шапка авторского блока "КОГДА МЕЛОДИЯ УЖЕ ЗВУЧИТ В ГОЛОВЕ"
   (Глава 10)
   ============================================================ */

.voice-quote__header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 1.2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 183, 194, 0.15);
    width: 100%;
}

.voice-quote__header img {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(0, 183, 194, 0.5);
    box-shadow: 0 0 15px rgba(0, 183, 194, 0.2);
    background: #fffdf7;
}

.voice-quote__header-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 2px;
}

.voice-quote__header-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #111;
    line-height: 1.2;
    letter-spacing: 0.02em;
}

.voice-quote__header-role {
    font-family: 'Arial', sans-serif;
    font-size: 0.7rem;
    color: #77736b;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

@media (max-width: 700px) {
    .voice-quote__header {
        gap: 10px;
        margin-bottom: 1rem;
        padding-bottom: 0.8rem;
    }
    .voice-quote__header img {
        width: 48px;
        height: 48px;
        min-width: 48px;
    }
    .voice-quote__header-name {
        font-size: 0.95rem;
    }
    .voice-quote__header-role {
        font-size: 0.6rem;
    }
}

/* ПРАВКА: Укрупненная золотая лупа поиска на ПК в размер кнопки скролла */
.pc-search-float {
    position: fixed;
    right: 20px;
    bottom: calc(15px + env(safe-area-inset-bottom, 0px)); /* В самом низу под стрелкой */
    width: 52px;  /* Увеличили диаметр круга под размер u-scroll-top */
    height: 52px; /* Увеличили диаметр круга под размер u-scroll-top */
    border: 1px solid #D4AF37; /* Благородное золотое окаймление */
    border-radius: 50%;
    /* Фирменный золотой градиент кнопки Читать онлайн */
    background: linear-gradient(135deg, #FFD966 0%, #D4AF37 50%, #8F6B12 100%);
    color: #0a0a1a; /* Контрастный глубокий цвет иконки */
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 6px 22px rgba(212, 175, 55, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s, filter 0.25s;
    padding: 0;
    margin: 0;
}

.pc-search-float:hover,
.pc-search-float:focus-visible {
    transform: translateY(-3px) scale(1.04);
    filter: brightness(1.1) drop-shadow(0 0 8px rgba(255, 217, 102, 0.4));
    box-shadow: 0 12px 28px rgba(212, 175, 55, 0.5), 0 0 20px rgba(255, 217, 102, 0.35);
    outline: none;
}

.pc-search-float svg {
    width: 22px; /* Увеличили размер самой иконки-лупы для баланса */
    height: 22px;
    fill: currentColor;
}

/* Настраиваем вертикальный стек: кнопка Наверх встает строго НАД укрупненной лупой */
@media (min-width: 1025px) {
    .u-scroll-top, .scroll-top {
        bottom: 85px !important; /* Безопасно приподняли стрелку наверх повыше */
    }
    .pc-search-float {
        bottom: 20px; /* Золотая лупа садится ровно под ней у самого края */
    }
}

/* Полное скрытие на мобильных, там работает твой мобильный интерфейс */
@media (max-width: 1024px) {
    .pc-search-float {
        display: none !important;
    }
}
