/* Интерактивы подборки. Все управляющие состояния используют общую палитру МузРейтинга. */
[hidden] { display: none !important; }
.home-hero.sound-awake .intro-trace { opacity: .72; transition: opacity .35s ease; }

/* Список моделей: родной select остаётся запасным вариантом без JS. */
.comments-section select option { background: var(--paper); color: var(--ink); }
.comments-section select option:checked { background: var(--orange); color: #fff; }
.model-dropdown { position: relative; width: 100%; }
.model-dropdown-trigger { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid #d4dcd6; border-radius: 9px; background: var(--paper); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.model-dropdown-trigger:hover,.model-dropdown-trigger[aria-expanded=true] { border-color: var(--orange); box-shadow: 0 0 0 3px #f0643222; }
.model-dropdown-trigger > span:last-child { color: var(--orange); font-size: 24px; line-height: .6; transition: transform .2s; }
.model-dropdown-trigger[aria-expanded=true] > span:last-child { transform: rotate(180deg); }
.model-dropdown-list { position: absolute; z-index: 75; top: calc(100% + 6px); left: 0; right: 0; max-height: 280px; overflow: auto; padding: 5px; border: 1px solid #dfc3b2; border-radius: 10px; background: var(--paper); box-shadow: 0 18px 36px #17221d30; }
.model-dropdown-option { display: block; width: 100%; border: 0; border-radius: 6px; padding: 9px 10px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.model-dropdown-option:hover,.model-dropdown-option:focus,.model-dropdown-option[aria-selected=true] { outline: 0; background: var(--orange-pale); color: var(--orange-dark); }
.model-dropdown-option:focus { box-shadow: inset 3px 0 var(--orange); }
html[data-theme=dark] .model-dropdown-trigger,html[data-theme=dark] .model-dropdown-list { background: var(--paper); border-color: var(--line); }
html[data-theme=dark] .comments-section select option { background: var(--paper); color: var(--ink); }
html[data-theme=dark] .comments-section select option:checked { background: var(--orange); color: #151719; }

/* Четыре шага выбора. Если JS недоступен, все fieldset и финальная кнопка остаются видимы. */
.quiz-section { position: relative; overflow: hidden; padding: clamp(20px,3vw,34px); background: linear-gradient(140deg,#fff,#fff8f2); }
.quiz-section:before { content: '♫'; position: absolute; right: -21px; top: -70px; color: #f064320e; font-size: 205px; pointer-events: none; }
.quiz-section form { display: block; position: relative; }
.quiz-heading p:last-child { max-width: 62ch; }
.quiz-progress { margin: 22px 0 26px; }
.quiz-progress > div { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.quiz-progress > div span { color: var(--orange-dark); font-weight: 850; font-size: 12px; letter-spacing: .07em; }
.quiz-progress > div strong { color: var(--ink); font-size: 17px; }
.quiz-progress progress { display: block; width: 100%; height: 7px; margin: 9px 0 14px; border: 0; border-radius: 10px; overflow: hidden; background: #e8e4df; accent-color: var(--orange); }
.quiz-progress progress::-webkit-progress-bar { background: #e8e4df; }
.quiz-progress progress::-webkit-progress-value { background: var(--orange); border-radius: 10px; transition: width .3s; }
.quiz-progress progress::-moz-progress-bar { background: var(--orange); }
.quiz-progress ol { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; list-style: none; margin: 0; padding: 0; }
.quiz-progress li { font-size: 12px; color: var(--muted); padding: 8px 5px; border-radius: 7px; background: #f4f1ed; text-align: center; }
.quiz-progress li.is-active { background: var(--orange-pale); color: var(--orange-dark); font-weight: 800; }
.quiz-progress li.is-done { color: var(--pro); background: #eaf1e9; }
.quiz-section .quiz-step { position: relative; border: 0; padding: 0; margin: 0; animation: quiz-step-enter .3s ease-out; }
.quiz-step legend { padding: 0; margin: 0 0 5px; font-size: clamp(22px,2.4vw,28px); line-height: 1.2; font-weight: 850; }
.quiz-step-hint { color: var(--muted); font-size: 15px; margin: 0 0 17px; }
.quiz-section .quiz-step label { display: grid; grid-template-columns: 23px 44px minmax(0,1fr); grid-template-rows: auto auto; align-items: center; column-gap: 12px; max-width: 650px; margin: 9px 0; padding: 13px 16px; border-radius: 12px; background: var(--paper); }
.quiz-step label input { grid-column: 1; grid-row: 1/3; margin: 0; width: 18px; height: 18px; }
.quiz-step label > span { grid-column: 2; grid-row: 1/3; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 9px; background: #f3f5f0; color: var(--link); font-size: 25px; }
.quiz-step label strong { grid-column: 3; grid-row: 1; color: var(--ink); font-size: 16px; }
.quiz-step label small { grid-column: 3; grid-row: 2; color: var(--muted); font-size: 13px; }
.quiz-section .quiz-step label:has(input:checked) { box-shadow: inset 4px 0 var(--orange),0 8px 18px #853e1d10; }
.quiz-step label:has(input:checked) > span { background: var(--orange-pale); color: var(--orange-dark); }
.quiz-navigation { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; margin-top: 20px; }
.quiz-navigation .button { margin-left: auto; }
.quiz-back { border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); padding: 10px 16px; font-weight: 800; cursor: pointer; }
.quiz-back:hover,.quiz-back:focus-visible { border-color: var(--orange); color: var(--orange-dark); }
.quiz-error { color: #a24627; font-size: 13px; }
.quiz-result { margin-top: 20px; border: 1px solid #d8e6d7; background: #f0f6ef; }
.quiz-result .quiz-back { margin-left: 16px; }
@keyframes quiz-step-enter { from { opacity: .3; transform: translateX(9px); } to { opacity: 1; transform: translateX(0); } }
html[data-theme=dark] .quiz-section { background: linear-gradient(140deg,#292f32,#302a26); }
html[data-theme=dark] .quiz-progress li { background: #34383a; }
html[data-theme=dark] .quiz-progress li.is-active { background: var(--orange-pale); }
html[data-theme=dark] .quiz-progress li.is-done { background: #263b30; }
html[data-theme=dark] .quiz-step label > span { background: #343c39; }
html[data-theme=dark] .quiz-step label:has(input:checked) > span { background: var(--orange-pale); }
html[data-theme=dark] .quiz-result { background: #293b2e; border-color: #476649; }

/* Персональная шкала модели, не смешанная с баллом редакции. */
.reader-rating { flex: 1 1 390px; min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #faf8f5; }
.reader-rating-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 5px 10px; margin-bottom: 11px; }
.reader-rating-head strong { color: var(--ink); }
.reader-rating-head output { color: var(--orange-dark); font-size: 13px; font-weight: 800; }
.rating-scale { display: grid; grid-template-columns: repeat(10,minmax(0,1fr)); gap: 4px; }
.rating-scale button { min-width: 0; min-height: 31px; padding: 2px 0; border: 1px solid #d6dcd6; border-radius: 6px; color: var(--muted); background: var(--paper); cursor: pointer; font: inherit; font-size: 12px; font-weight: 800; transition: transform .15s,border-color .15s,background .15s; }
.rating-scale button:hover,.rating-scale button:focus-visible { transform: translateY(-3px); border-color: var(--orange); outline: 2px solid #f0643233; }
.rating-scale button.is-filled { background: var(--orange-pale); color: var(--orange-dark); border-color: #e8a680; }
.rating-scale button[aria-pressed=true] { background: var(--orange); border-color: var(--orange); color: #fff; box-shadow: 0 4px 10px #f0643233; }
.reader-rating small { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; }
.product-actions .compare-checkbox { align-self: center; }
html[data-theme=dark] .reader-rating { background: #2e302e; }
html[data-theme=dark] .rating-scale button { background: #323a3b; border-color: var(--line); color: var(--text); }
html[data-theme=dark] .rating-scale button.is-filled { background: var(--orange-pale); border-color: #956248; color: #ffd4bc; }
html[data-theme=dark] .rating-scale button[aria-pressed=true] { background: var(--orange); color: #141619; }

/* Простое безопасное форматирование текста и реакции на комментарии. */
.format-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; padding: 8px 10px; background: #f5f7f3; border-bottom: 1px solid var(--line); }
.format-toolbar button { display: grid; place-items: center; width: 33px; height: 32px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ink); cursor: pointer; font-size: 18px; }
.format-toolbar button:hover,.format-toolbar button:focus-visible,.format-toolbar button[aria-pressed=true] { background: var(--orange-pale); border-color: #eec3ac; color: var(--orange-dark); }
.format-toolbar [data-comment-align=right] { transform: scaleX(-1); }
.format-divider { width: 1px; height: 21px; background: #ccd4cc; margin: 0 5px; }
.format-label { color: var(--muted); font-size: 12px; margin-right: 2px; }
.comment-message { overflow-wrap: anywhere; line-height: 1.55; }
.comment-message.align-center { text-align: center; }
.comment-message.align-right { text-align: right; }
.comment-message p { margin: 7px 0; }
.comment-message ul { margin: 9px 0; padding-left: 20px; }
.comment-message.align-right ul,.comment-message.align-center ul { display: inline-block; text-align: left; }
.comment-message blockquote { margin: 9px 0; padding: 8px 13px; border-left: 3px solid var(--orange); background: var(--orange-pale); border-radius: 0 7px 7px 0; text-align: left; }
.comment-preview .comment-model { display: inline-block; margin-bottom: 8px; }
.comment-reactions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 9px 0 7px; }
.comment-reactions button { display: inline-flex; gap: 6px; align-items: center; padding: 5px 10px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); color: var(--muted); cursor: pointer; font: inherit; font-size: 12px; }
.comment-reactions button:hover,.comment-reactions button:focus-visible,.comment-reactions button[aria-pressed=true] { border-color: var(--orange); background: var(--orange-pale); color: var(--orange-dark); }
.comment-reactions button > span:first-child { font-size: 17px; line-height: 1; }
html[data-theme=dark] .format-toolbar { background: #2c3532; }
html[data-theme=dark] .comment-reactions button { background: #2c3336; }
html[data-theme=dark] .comment-reactions button[aria-pressed=true] { background: var(--orange-pale); }

@media(max-width:700px) {
  .quiz-section { padding: 19px; }
  .quiz-progress li { font-size: 10px; padding: 7px 2px; }
  .quiz-section .quiz-step label { grid-template-columns: 20px 36px minmax(0,1fr); padding: 11px; column-gap: 8px; }
  .quiz-step label > span { width: 35px; height: 35px; font-size: 21px; }
  .quiz-navigation .button { margin-left: 0; }
  .quiz-error { width: 100%; order: 3; }
  .reader-rating { flex-basis: 100%; }
  .format-label { flex-basis: 100%; }
  .model-dropdown-list { max-height: 240px; }
}
@media(prefers-reduced-motion:reduce) {
  .quiz-step { animation: none !important; }
  .rating-scale button:hover,.rating-scale button:focus-visible { transform: none; }
}
.comment-reactions b { min-width: 16px; color: var(--orange-dark); font-size: 11px; }
.product-review .reader-rating { margin-top: 18px; }
.model-dropdown.open-up .model-dropdown-list { top: auto; bottom: calc(100% + 6px); }
