/* ==========================================================================
   Колесо Фортуны — все стили сайта. Написано руками, без библиотек.
   Порядок: переменные тем → сброс → типографика → шапка → главная →
   инструмент → оценка → FAQ → текстовые страницы → подвал → cookie → адаптив.
   ========================================================================== */

/* --- 1. Темы -------------------------------------------------------------- */

:root {
    /* тёплая «бумажная» светлая тема */
    --bg:            #f6efe3;
    --bg-alt:        #efe6d6;
    --surface:       #fffaf1;
    --surface-2:     #f9f2e5;
    --text:          #241c14;
    --text-soft:     #4b3f32;
    --text-muted:    #6f6151;
    --border:        #e2d6c1;
    --border-strong: #cdbda2;

    --accent:         #bf4526;
    --accent-hover:   #a63a1e;
    --link:           #a63a1e;   /* 5.2:1 на бумажном фоне — акцент давал 4.49 */
    --accent-soft:    #f7e4dc;
    --accent-contrast:#fffaf1;

    --star:        #f0b429;
    --star-stroke: #c88a10;
    --star-off:    #c4b096;

    --wheel-rim:   #2a2118;
    --wheel-rim-2: #56412c;
    --wheel-hub:   #fffaf1;
    --pointer-inner: #fffaf1;
    --chip-bg:     #fdf6ea;
    --wheel-glow:  rgba(191, 69, 38, .14);

    --focus: #1f6feb;

    --shadow-1: 0 1px 2px rgba(60, 44, 24, .06), 0 2px 8px rgba(60, 44, 24, .06);
    --shadow-2: 0 4px 12px rgba(60, 44, 24, .09), 0 12px 32px rgba(60, 44, 24, .10);
    --shadow-3: 0 18px 48px rgba(40, 28, 14, .22);
    --header-bg: rgba(246, 239, 227, .78);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-pill: 999px;

    --maxw: 1120px;
    --maxw-text: 760px;
}

:root[data-theme="dark"] {
    /* графитовая тёмная тема: свои цвета, а не инверсия светлой */
    --bg:            #15171a;
    --bg-alt:        #1b1e22;
    --surface:       #1f2328;
    --surface-2:     #262b31;
    --text:          #ece6dc;
    --text-soft:     #cfc7ba;
    --text-muted:    #9b958a;
    --border:        #333a41;
    --border-strong: #464f58;

    --accent:         #e8764a;
    --accent-hover:   #f28c62;
    --link:           #f0906a;   /* на графите контраст выше, чем у акцента */
    --accent-soft:    #35251e;
    --accent-contrast:#1a1204;

    --star:        #f6c453;
    --star-stroke: #b8860b;
    --star-off:    #4d555e;

    --wheel-rim:   #0b0d0f;
    --wheel-rim-2: #333c44;
    --wheel-hub:   #f1ebe1;
    --pointer-inner: #22262b;
    --chip-bg:     #23282e;
    --wheel-glow:  rgba(232, 118, 74, .16);

    --focus: #7cb0ff;

    --shadow-1: 0 1px 2px rgba(0, 0, 0, .35), 0 2px 8px rgba(0, 0, 0, .28);
    --shadow-2: 0 4px 14px rgba(0, 0, 0, .40), 0 14px 36px rgba(0, 0, 0, .34);
    --shadow-3: 0 20px 56px rgba(0, 0, 0, .62);
    --header-bg: rgba(21, 23, 26, .78);
}

/* --- 2. Сброс и база ----------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter",
                 system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; }

img, svg, canvas { display: block; max-width: 100%; }

a {
    color: var(--link);
    text-decoration-color: color-mix(in srgb, var(--link) 40%, transparent);
    text-underline-offset: 3px;
}
a:hover { color: var(--accent-hover); }

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
    border-radius: 4px;
}

button { font: inherit; color: inherit; }

code {
    font-family: "SF Mono", "Cascadia Mono", "DejaVu Sans Mono", monospace;
    font-size: .92em;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .1em .38em;
}

.wrap {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 20px;
}
.wrap--text { max-width: var(--maxw-text); }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    background: var(--surface);
    color: var(--text);
    padding: 12px 18px;
    border-radius: 0 0 var(--radius-md) 0;
    box-shadow: var(--shadow-2);
}
.skip-link:focus { left: 0; }

/* --- 3. Типографика ------------------------------------------------------ */

h1, h2, h3 {
    line-height: 1.18;
    letter-spacing: -.015em;
    margin: 0;
    font-weight: 780;
}

.hero__title  { font-size: clamp(1.85rem, 3.6vw, 2.5rem); }
.page__title  { font-size: clamp(1.7rem, 4.6vw, 2.6rem); margin-bottom: .6em; }
.section-title, .faq__title {
    font-size: clamp(1.35rem, 3.2vw, 1.9rem);
    margin: 1.8rem 0 1.3rem;
    padding-bottom: .45rem;
    position: relative;
}
.section-title::after, .faq__title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 54px;
    height: 4px;
    border-radius: 2px;
    background: var(--accent);
}

.page__lead { font-size: clamp(1.05rem, 2.1vw, 1.24rem); }
.hero__lead { font-size: clamp(1rem, 1.5vw, 1.12rem); }
.page__lead, .hero__lead {
    color: var(--text-soft);
    line-height: 1.6;
}

/* --- 4. Кнопки ----------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    padding: 14px 26px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    background: var(--accent);
    color: var(--accent-contrast);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--shadow-1);
    transition: background .18s ease, transform .12s ease, box-shadow .18s ease;
}
.btn:hover { background: var(--accent-hover); color: var(--accent-contrast); box-shadow: var(--shadow-2); }
.btn:active { transform: translateY(1px); }

.btn--ghost {
    background: transparent;
    border-color: var(--border-strong);
    color: var(--text);
    box-shadow: none;
}
.btn--ghost:hover { background: var(--surface-2); color: var(--text); border-color: var(--accent); }

.btn--small { padding: 9px 18px; font-size: .94rem; }

.btn--spin {
    width: 100%;
    max-width: 340px;
    position: relative;
    padding: 17px 32px;
    font-size: clamp(1.05rem, 3.4vw, 1.28rem);
    font-weight: 820;
    letter-spacing: .12em;
    text-transform: uppercase;
    box-shadow: var(--shadow-2), 0 10px 30px var(--wheel-glow);
}
.btn--spin:hover { transform: translateY(-1px); }
.btn--spin:active { transform: translateY(1px); }
.btn--spin[data-spinning="1"] { opacity: .72; cursor: progress; }

.link-btn {
    background: none;
    border: 0;
    padding: 0;
    color: var(--link);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.link-btn:hover { color: var(--accent-hover); }

/* --- 5. Шапка ------------------------------------------------------------ */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: background .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.site-header.is-scrolled {
    background: var(--surface);
    border-bottom-color: var(--border);
    box-shadow: var(--shadow-1);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 66px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--text);
    text-decoration: none;
    font-weight: 800;
    letter-spacing: -.01em;
}
.brand:hover { color: var(--text); }
.brand__mark {
    display: grid;
    place-items: center;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .18));
}
.brand__name { font-size: 1.12rem; }

.site-header__inner { position: relative; }

/* Чекбокс — состояние мобильного меню. Так навигация работает и без JS. */
.nav-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    margin: 0;
}
.nav-burger { display: none; }

.site-nav { margin-left: auto; }
.site-nav__list {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-nav__link {
    display: block;
    padding: 9px 14px;
    border-radius: var(--radius-pill);
    color: var(--text-soft);
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    transition: background .16s ease, color .16s ease;
}
.site-nav__link:hover { color: var(--text); background: var(--surface-2); }
.site-nav__link[aria-current="page"] {
    color: var(--link);
    background: var(--accent-soft);
    font-weight: 700;
}

.theme-toggle {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text-soft);
    cursor: pointer;
    transition: color .16s ease, border-color .16s ease, transform .16s ease;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); transform: rotate(-12deg); }
.theme-toggle__moon { display: none; }
:root[data-theme="dark"] .theme-toggle__sun  { display: none; }
:root[data-theme="dark"] .theme-toggle__moon { display: block; }

/* --- 6. Главная: hero и шаги -------------------------------------------- */

.hero {
    position: relative;
    overflow: hidden;
    /* Высота hero подобрана так, чтобы на экране 1440×900 колесо и кнопка
       «Крутить» попадали в первый экран без прокрутки. */
    padding: clamp(1rem, 2vw, 1.5rem) 0 clamp(.7rem, 1.6vw, 1.1rem);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.hero__lead { max-width: 48ch; margin: .6rem 0 0; }
.hero .wrap { position: relative; z-index: 1; }


.steps { padding: clamp(1.2rem, 2.6vw, 2rem) 0 clamp(1.2rem, 3vw, 2.2rem); }
.steps__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: none;
}
.steps__item {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px 24px 22px;
    box-shadow: var(--shadow-1);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.steps__item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-2);
    border-color: var(--border-strong);
}
.steps__num {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-contrast);
    font-weight: 800;
    margin-bottom: 12px;
}
.steps__item h3 { font-size: 1.14rem; margin-bottom: .4em; }
.steps__item p { margin: 0; color: var(--text-muted); font-size: .98rem; }

/* --- 7. Инструмент ------------------------------------------------------- */

.tool {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2);
    padding: clamp(16px, 2vw, 24px);
    margin: 0 0 clamp(1rem, 2.4vw, 1.6rem);
}
.tool__title {
    font-size: clamp(1.1rem, 2.2vw, 1.32rem);
    margin-bottom: .6rem;
}

.notice {
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin: 0 0 1rem;
    font-size: .96rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
}
.notice--warn { border-left: 4px solid var(--accent); }

.tool__modes {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    margin-bottom: 16px;
    max-width: 100%;
    flex-wrap: wrap;
}
.mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    padding: 9px 18px;
    border-radius: var(--radius-pill);
    font-weight: 650;
    cursor: pointer;
    transition: background .16s ease, color .16s ease;
}
.mode-btn:hover { color: var(--text); }
.mode-btn.is-active {
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-1);
}

.tool__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: clamp(20px, 4vw, 40px);
    align-items: start;
}
.tool__stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.wheel {
    position: relative;
    width: 100%;
    /* Мягкое свечение под колесом — центр композиции виден сразу. */
    background: radial-gradient(circle at 50% 52%, var(--wheel-glow), transparent 68%);
    max-width: 400px;
    aspect-ratio: 1 / 1;
}
.wheel__canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: transparent;
    filter: drop-shadow(0 10px 26px rgba(20, 12, 4, .26));
    will-change: transform;
}
.wheel__pointer {
    /* Правый верхний угол: центр стрелки садится на обод под -45°,
       острие развёрнуто в центр колеса. Подписи секторов здесь идут почти
       горизонтально и читаются легче, чем под верхней точкой. */
    position: absolute;
    top: 14.65%;
    left: 85.35%;
    /* translateY после поворота идёт вдоль оси самой стрелки: остриё заходит за обод
       в сектор, а не упирается в него снаружи. Без этого стрелка «висит» рядом. */
    transform: translate(-50%, -50%) rotate(45deg) translateY(9%);
    z-index: 3;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .3));
}
.wheel__fallback {
    /* Показывается только браузером без поддержки canvas — лежит внутри тега. */
    margin: 0;
    padding: 20px;
    color: var(--text-muted);
}

.picker { width: 100%; }
.picker__list {
    list-style: none;
    counter-reset: pick;
    margin: 0;
    padding: 0;
    max-height: 420px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-2);
}
.picker__item {
    counter-increment: pick;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    transition: background .1s linear, color .1s linear;
    overflow-wrap: anywhere;
}
.picker__item:last-child { border-bottom: 0; }
.picker__item::before {
    content: counter(pick);
    flex: none;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: .82rem;
    font-weight: 700;
}
.picker__item.is-active {
    background: var(--accent);
    color: var(--accent-contrast);
}
.picker__item.is-active::before {
    background: var(--accent-contrast);
    color: var(--accent);
    border-color: transparent;
}
.picker__item.is-winner {
    background: var(--accent);
    color: var(--accent-contrast);
    box-shadow: inset 0 0 0 3px var(--star);
}
.picker__empty {
    padding: 18px 16px;
    margin: 0;
    color: var(--text-muted);
}

.tool__hint {
    margin: 0;
    min-height: 1.4em;
    text-align: center;
    color: var(--text-muted);
    font-size: .95rem;
}
.tool__hint.is-warn { color: var(--accent); font-weight: 600; }

.tool__input {
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.field__label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
}
.field__area {
    width: 100%;
    max-width: 100%;
    resize: vertical;
    padding: 14px 16px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--surface-2);
    color: var(--text);
    font: inherit;
    line-height: 1.7;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .05);
    flex: 1 1 auto;
    min-height: 190px;
}
.field__area:focus-visible { border-color: var(--accent); }
.field__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.field__count { font-weight: 700; color: var(--text-soft); }
.field__help {
    margin: 12px 0 0;
    color: var(--text-muted);
    font-size: .92rem;
}

/* Готовые наборы: заодно закрывают пустоту под полем ввода на широких экранах. */
.presets { margin-top: auto; padding-top: 18px; }
.presets__label {
    display: block;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 9px;
}
.presets__row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
    border: 1px solid var(--border-strong);
    background: var(--chip-bg);
    color: var(--text-soft);
    border-radius: var(--radius-pill);
    padding: 7px 14px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: color .16s ease, border-color .16s ease, background .16s ease, transform .12s ease;
}
.chip:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-soft);
    transform: translateY(-1px);
}
.chip:active { transform: translateY(0); }

/* --- 8. Модальное окно победителя ---------------------------------------- */

.modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 20px;
}
.modal[hidden] { display: none; }
.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 14, 8, .58);
    backdrop-filter: blur(3px);
    animation: fade .18s ease-out;
}
.modal__box {
    position: relative;
    width: 100%;
    max-width: 440px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-3);
    padding: 30px 26px 26px;
    animation: pop .26s cubic-bezier(.2, 1.3, .4, 1);
    /* Полоса и свечение берут цвет выпавшего сектора — его ставит JS в --win. */
    border-top: 5px solid var(--win, var(--accent));
    overflow: hidden;
}
.modal__star {
    display: grid;
    place-items: center;
    width: 124px;
    height: 124px;
    margin: 0 auto 4px;
    border-radius: 50%;
    background: radial-gradient(circle,
        color-mix(in srgb, var(--win, var(--accent)) 30%, transparent) 0%,
        transparent 66%);
}
.modal__star svg { animation: spin-in .5s cubic-bezier(.2, 1.2, .3, 1); }
.modal__label {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: .82rem;
    font-weight: 700;
    color: var(--text-muted);
}
.modal__value {
    margin: .25em 0 1.05em;
    font-size: clamp(1.7rem, 6.4vw, 2.5rem);
    font-weight: 830;
    letter-spacing: -.02em;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop {
    from { opacity: 0; transform: translateY(14px) scale(.94); }
    to   { opacity: 1; transform: none; }
}
@keyframes spin-in {
    from { transform: rotate(-140deg) scale(.4); opacity: 0; }
    to   { transform: none; opacity: 1; }
}

/* --- 9. Оценка ----------------------------------------------------------- */

.rate {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(18px, 3vw, 34px);
    background:
        radial-gradient(620px 240px at 88% 0%, var(--accent-soft), transparent 72%),
        var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-1);
    padding: clamp(20px, 3.4vw, 32px);
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}
.rate__main { min-width: 0; }
.rate__title { font-size: clamp(1.18rem, 3vw, 1.5rem); }
.rate__sub {
    margin: .5em 0 0;
    color: var(--text-muted);
    font-size: .94rem;
    max-width: 46ch;
}
.rate__stars {
    display: inline-flex;
    gap: 2px;
    margin: 14px 0 0;
}
.star {
    background: none;
    border: 0;
    padding: 4px;
    cursor: pointer;
    color: var(--star-off);
    transition: transform .14s ease, color .14s ease, filter .14s ease;
    border-radius: 8px;
}
.star svg { fill: currentColor; }
.star.is-on {
    color: var(--star);
    filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--star) 45%, transparent));
}
.star:hover { transform: scale(1.18) translateY(-2px); }
.rate__stars.is-done .star { cursor: default; }
.rate__stars.is-done .star:hover { transform: none; }

/* Плашка со средним баллом — крупная цифра, а не строчка мелким текстом. */
.rate__score {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 2px;
    min-width: 132px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    background: var(--surface-2);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-1);
}
.rate__score[hidden] { display: none; }
.rate__num {
    font-size: clamp(2rem, 5vw, 2.7rem);
    font-weight: 830;
    line-height: 1;
    letter-spacing: -.03em;
}
.rate__of {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.rate__count { color: var(--text-muted); font-size: .86rem; }

.rate__after {
    grid-column: 1 / -1;
    margin: 4px 0 0;
    padding: 20px;
    border-radius: var(--radius-md);
    background: var(--surface-2);
    border: 1px solid var(--border);
    text-align: left;
}
.rate__after[hidden] { display: none; }
.rate__after p { margin: 0 0 14px; font-size: .98rem; }
.rate__after--good { border-left: 4px solid var(--star); }

/* --- 10. FAQ ------------------------------------------------------------- */

.faq { margin-bottom: clamp(2rem, 6vw, 3.5rem); }
.faq__list { display: grid; gap: 12px; }

.faq__item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-1);
    overflow: hidden;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.faq__item:hover { border-color: var(--border-strong); box-shadow: var(--shadow-2); }
.faq__item[open] { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.faq__item[open] .faq__q { color: var(--accent); }
.faq__q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 17px 20px;
    cursor: pointer;
    font-weight: 700;
    list-style: none;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { color: var(--accent); }
.faq__chevron {
    flex: none;
    color: var(--text-muted);
    transition: transform .2s ease;
    display: grid;
    place-items: center;
}
.faq__item[open] .faq__chevron { transform: rotate(180deg); }
.faq__a {
    padding: 0 20px 18px;
    border-top: 1px solid var(--border);
    padding-top: 14px;
    color: var(--text-soft);
}
.faq__a p { margin: 0; }

/* --- 10b. Хлебные крошки ------------------------------------------------- */

.breadcrumbs {
    padding-top: 20px;
    font-size: .9rem;
}
.breadcrumbs__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.breadcrumbs__item { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumbs__item + .breadcrumbs__item::before {
    content: '/';
    color: var(--text-muted);
    opacity: .7;
}
.breadcrumbs__link {
    color: var(--text-muted);
    text-decoration: none;
}
.breadcrumbs__link:hover { color: var(--accent); text-decoration: underline; }
.breadcrumbs__current { color: var(--text-soft); font-weight: 600; }

/* Заголовок страницы после крошек не должен отъезжать вниз лишний раз. */
.breadcrumbs + .page { padding-top: clamp(.9rem, 2vw, 1.4rem); }

/* --- 11. Текстовые страницы --------------------------------------------- */

.page { padding: clamp(1.8rem, 5vw, 3.4rem) 0 clamp(2rem, 6vw, 4rem); }
.page p { color: var(--text-soft); }
.page h2 {
    font-size: clamp(1.2rem, 2.8vw, 1.45rem);
    margin: 2rem 0 .7rem;
}
.page__note {
    margin-top: 2.2rem;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-md);
    font-size: .97rem;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-1);
}
.card h3 { font-size: 1.06rem; margin-bottom: .45em; }
.card p { margin: 0; font-size: .96rem; color: var(--text-muted); }

.timeline {
    list-style: none;
    margin: 2rem 0 0;
    padding: 0 0 0 30px;
    border-left: 2px solid var(--border);
}
.timeline__item { position: relative; padding: 0 0 2.2rem 8px; }
.timeline__item:last-child { padding-bottom: .5rem; }
.timeline__dot {
    position: absolute;
    left: -39px;
    top: 6px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--bg);
}
.timeline__date {
    display: block;
    font-size: .87rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--accent);
}
.timeline__title { font-size: 1.2rem; margin: .3em 0 .4em; }
.timeline__text { margin: 0; color: var(--text-soft); }

.contact__mail {
    font-size: clamp(1.2rem, 4vw, 1.7rem);
    font-weight: 800;
    margin: 1.6rem 0;
    overflow-wrap: anywhere;
}

.sitemap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 1.8rem;
}
.sitemap__group {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 22px;
    box-shadow: var(--shadow-1);
}
.sitemap__title { font-size: 1.08rem; margin-bottom: .7em; }
.sitemap__list { list-style: none; margin: 0; padding: 0; }
.sitemap__list li {
    padding: 9px 0;
    border-bottom: 1px dashed var(--border);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}
.sitemap__list li:last-child { border-bottom: 0; }
.sitemap__list a { font-weight: 650; }
.sitemap__url { color: var(--text-muted); font-size: .84rem; }

.page--404 { text-align: center; }
.error__code {
    font-size: clamp(5rem, 20vw, 9rem);
    font-weight: 850;
    line-height: .9;
    margin: 0 0 .1em;
    letter-spacing: -.04em;
    color: var(--accent);
    opacity: .3;
}
.page--404 .page__lead { margin-left: auto; margin-right: auto; max-width: 52ch; }
.error__path { overflow-wrap: anywhere; }
.error__actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* --- 12. Подвал ---------------------------------------------------------- */

.site-footer {
    position: relative;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: clamp(2rem, 5vw, 3rem) 0 1.4rem;
    margin-top: auto;
}
.site-footer__inner {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
}
.site-footer__name { font-weight: 800; font-size: 1.1rem; }
.site-footer__tagline {
    margin: .5em 0 0;
    color: var(--text-muted);
    font-size: .95rem;
    max-width: 40ch;
}
.site-footer__col-title {
    font-size: .84rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--text-muted);
    margin-bottom: .9em;
}
.site-footer__list { list-style: none; margin: 0; padding: 0; }
.site-footer__list li { margin-bottom: .55em; }
.site-footer__list a {
    color: var(--text-soft);
    text-decoration: none;
    font-weight: 600;
}
.site-footer__list a:hover { color: var(--accent); text-decoration: underline; }

.site-footer__bottom {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 2.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: .9rem;
}
.site-footer__motto { font-style: italic; }

/* --- 13. Плашка cookie --------------------------------------------------- */

.cookie-bar {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 95;          /* выше модалки победителя, иначе всплывёт поверх неё */
    width: calc(100% - 32px);
    max-width: 680px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-3);
    padding: 14px 18px;
    animation: pop .3s ease-out;
}
.cookie-bar[hidden] { display: none; }
.cookie-bar__text {
    margin: 0;
    font-size: .92rem;
    color: var(--text-soft);
}
.cookie-bar .btn { flex: none; }

/* Плашка cookie на телефоне: требование владельца 06.08.2026 — «минимизируй это
   окно, особенно на мобильном». Замер до правки на 390×780: 117 px и 13,9 % экрана;
   служебная плашка съедала седьмую часть первого экрана у инструмента. */
@media (max-width: 560px) {
    .cookie-bar {
        bottom: 10px;
        width: calc(100% - 20px);
        gap: 10px;
        padding: 9px 11px;
        border-radius: var(--radius-sm, 8px);
    }
    .cookie-bar__text { font-size: .78rem; line-height: 1.32; }
    .cookie-bar .btn  { padding: 6px 12px; font-size: .8rem; }
}

/* --- 14. Адаптив --------------------------------------------------------- */

@media (min-width: 921px) {
    .tool {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        column-gap: 20px;
    }
    .tool__title { grid-column: 1; margin-bottom: 0; }
    .tool__modes { grid-column: 2; justify-self: end; margin-bottom: 0; }
    .tool__grid, .tool > noscript, .tool > .notice { grid-column: 1 / -1; }
    .tool__grid { margin-top: 14px; }
}

@media (max-width: 920px) {
    /* Один столбец в порядке разметки: колесо и «Крутить» первыми,
       поле ввода под ними — иначе инструмент уезжает за первый экран. */
    .tool__grid { grid-template-columns: 1fr; }
    .tool__input { margin-top: 6px; }
    .site-footer__inner { grid-template-columns: 1fr 1fr; }
    .site-footer__about { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
    .rate { grid-template-columns: 1fr; justify-items: start; }
    .rate__score { justify-self: stretch; }
}

/* Мобильная навигация: бургер и панель под шапкой. */
@media (max-width: 820px) {
    .site-header__inner { min-height: 58px; }
    .brand__name { font-size: 1.02rem; }

    .nav-burger {
        display: grid;
        place-items: center;
        width: 40px;
        height: 40px;
        margin-left: auto;
        border: 1px solid var(--border);
        border-radius: 50%;
        background: var(--surface);
        color: var(--text-soft);
        cursor: pointer;
    }
    .nav-burger__close { display: none; }
    .nav-toggle:checked ~ .nav-burger { color: var(--accent); border-color: var(--accent); }
    .nav-toggle:checked ~ .nav-burger .nav-burger__open { display: none; }
    .nav-toggle:checked ~ .nav-burger .nav-burger__close { display: block; }
    .nav-toggle:focus-visible ~ .nav-burger {
        outline: 3px solid var(--focus);
        outline-offset: 2px;
    }

    .site-nav {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: calc(100% + 1px);
        margin: 0;
        padding: 8px;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 0 0 var(--radius-md) var(--radius-md);
        box-shadow: var(--shadow-2);
    }
    .nav-toggle:checked ~ .site-nav { display: block; }
    .site-nav__list { flex-direction: column; align-items: stretch; gap: 2px; }
    .site-nav__link { padding: 13px 14px; border-radius: var(--radius-sm); }
}

@media (max-width: 560px) {
    body { font-size: 16px; }
    .wrap { padding: 0 14px; }
    /* На телефоне первый экран отдаём инструменту: hero поджимаем,
       а три «плюса» прячем — те же мысли есть в блоке «Три шага» и в FAQ. */
    .hero { padding: .9rem 0 .8rem; }
    .hero__title { font-size: 1.6rem; }
    .hero__lead { font-size: .95rem; line-height: 1.45; margin-top: .35rem; }
    .tool { padding: 16px 14px; }
    /* На телефоне заголовок инструмента дублирует H1 и съедает первый экран —
       убираем визуально, но оставляем для скринридеров. */
    .tool__title {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
        margin: 0;
    }
    .tool__modes { margin-bottom: 14px; }
    .tool__stage { gap: 14px; }
    .tool { border-radius: var(--radius-md); }
    .tool__modes { display: flex; width: 100%; }
    .mode-btn { flex: 1; justify-content: center; padding: 11px 6px; font-size: .88rem; white-space: nowrap; }
    .mode-btn svg { display: none; }
    .field__area { height: 9em; }
    .wheel { max-width: min(100%, 80vw); }
    .btn--spin { max-width: 100%; padding: 20px; }
    .picker__list { max-height: 320px; }
    /* ⚠️ Замер 06.08.2026: в колонку плашка вырастала до 186 px — 22 % экрана
       телефона 390×844, пятая часть первого экрана под сообщением, которое читают
       один раз. Держим текст и кнопку в одной строке; тексту нужен min-width: 0,
       иначе flex не даёт ему сжаться и кнопку всё равно выносит вниз. */
    .cookie-bar {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 10px;
        padding: 10px 14px;
        bottom: 10px;
    }
    .cookie-bar__text { font-size: .82rem; line-height: 1.45; min-width: 0; }
    .cookie-bar .btn { flex: 0 0 auto; }
    .site-footer__bottom { flex-direction: column; gap: 6px; }
    .timeline { padding-left: 22px; }
    .timeline__dot { left: -31px; }
}

@media (min-width: 1400px) {
    :root { --maxw: 1220px; }
    .wheel { max-width: 400px; }
}

/* Уважаем системную просьбу убрать анимации. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* Печать: инструмент бессмыслен на бумаге, оставляем текст. */
@media print {
    .site-header, .cookie-bar, .tool__modes, .btn, .rate__stars { display: none; }
    body { background: #fff; color: #000; }
}

/* --- 15. Раскладка для эфира (/overlay) ---------------------------------- */

/* На странице остаётся только колесо и кнопка: остальное в OBS пришлось бы
   обрезать кадрированием. Фон прозрачный — в браузере он белый, в OBS его нет. */
body.overlay {
    background: transparent;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 12px;
}
body.overlay .overlay__stage { width: min(96vmin, 900px); }
body.overlay .tool {
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
    display: block;
}
/* Всё, что не колесо и не кнопка, на эфирной странице лишнее. */
body.overlay .tool__title,
body.overlay .tool__modes,
body.overlay .tool__input,
body.overlay .picker,
body.overlay .tool__hint { display: none; }
body.overlay .tool__grid { display: block; }
body.overlay .tool__stage { gap: 18px; }
/* 72vh в ограничении — не украшение: без него на окне 1280×900 колесо занимало 760 px,
   и ссылка «Вернуться на сайт» уезжала за нижний край (замер: низ 936 при окне 900). */
body.overlay .wheel { max-width: min(88vmin, 72vh, 760px); }
body.overlay .btn--spin { max-width: min(70vmin, 460px); }

/* Список правится в маленьком окне «Взаимодействие» OBS, поэтому поле
   спрятано под раскрывашку, а не убрано совсем. */
body.overlay .overlay__edit {
    width: min(88vmin, 760px);
    margin-top: 14px;
    font-size: .95rem;
}
body.overlay .overlay__edit > summary {
    cursor: pointer;
    color: var(--text-muted);
    list-style: none;
}
body.overlay .overlay__edit > summary::-webkit-details-marker { display: none; }
body.overlay .overlay__edit[open] .tool__input { display: flex; margin-top: 10px; }

/* Выход с эфирной страницы. Шапки здесь нет, и без этой ссылки уйти можно было
   только кнопкой «назад» в браузере — а в источнике «Браузер» OBS её нет вовсе.
   Внизу и приглушённо: в кадре она не нужна, нужна человеку в обычной вкладке. */
body.overlay .overlay__back {
    margin-top: 10px;
    font-size: .9rem;
    color: var(--text-muted);
    text-decoration: none;
    opacity: .75;
}
body.overlay .overlay__back:hover { opacity: 1; text-decoration: underline; }

/* В эфире затемнение под модалкой легло бы серым прямоугольником на всю сцену:
   в OBS прозрачен только фон, а полупрозрачная подложка остаётся видимой. */
body.overlay .modal__backdrop {
    background: transparent;
    backdrop-filter: none;
}

.tool__fullscreen {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .93rem;
    text-decoration: none;
}
.tool__fullscreen:hover { text-decoration: underline; }

/* В эфире колесо во весь кадр, и стрелка фиксированного размера на нём теряется. */
body.overlay .wheel__pointer { transform: translate(-50%, -50%) rotate(45deg) translateY(9%) scale(1.7); }
/* На телефоне колесо втрое меньше, а стрелка масштаба не знала и выглядела огромной:
   увеличение под кадр эфира держим только там, где колесо действительно крупное. */
@media (max-width: 560px) {
    body.overlay .wheel__pointer { transform: translate(-50%, -50%) rotate(45deg) translateY(9%) scale(1.1); }
}
