/* Личная страница simon.by/@slug (views/public-page/*). Цвет страницы — из настроек сайта: --pp-color, текст на нём —
   --pp-on-color. Шрифты: Manrope — заголовки, Onest — текст (layouts/public-page.php).
   Раскладка: на компьютере шапка во всю ширину и две колонки (контент + закреплённые квиз и чат), на телефоне —
   одна колонка, квиз сразу после шапки, внизу панель «Записаться» */

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

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

body {
    margin: 0;
    background: #F6F4F1;
    color: #1D1B24;
    font-family: Onest, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

.pp {
    --pp-color: #6D4FD6;
    --pp-on-color: #ffffff;
    --pp-ink: #1D1B24;
    --pp-text: #3F3B4C;
    --pp-muted: #5E5A6B;
    --pp-line: #E4E0EC;
    --pp-soft: color-mix(in srgb, var(--pp-color) 12%, #ffffff);
    --pp-dark: #1D1B24;
    --pp-display: Manrope, Onest, sans-serif;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}
.pp a { color: color-mix(in srgb, var(--pp-color) 70%, #1D1B24); }
[id] { scroll-margin-top: 16px; }

/* ---------- Кнопки ---------- */
.pp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    padding: 12px 24px;
    border: 1px solid transparent;
    border-radius: 14px;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.pp .pp-btn-primary { background: var(--pp-color); color: var(--pp-on-color); }
.pp .pp-btn-light { background: #ffffff; color: var(--pp-ink); border-color: #DDD8E8; }
.pp-btn:active { transform: scale(.98); }

/* ---------- Плашка демо-страницы (simon.by/@demo) ---------- */
.pp-demo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding: 12px 12px 12px 20px;
    border-radius: 16px;
    background: var(--pp-dark);
    color: #E9E6F0;
    font-size: 15px;
}
.pp-demo strong { color: #ffffff; }
.pp .pp-demo-link {
    flex: none;
    padding: 10px 18px;
    border-radius: 12px;
    background: #ffffff;
    color: var(--pp-dark);
    font-weight: 700;
    text-decoration: none;
}

/* ---------- Верхняя полоса ---------- */
.pp-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 0;
}
.pp .pp-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--pp-ink);
    text-decoration: none;
    font-family: var(--pp-display);
    font-weight: 800;
    font-size: 17px;
    min-width: 0;
}
.pp-brand img { width: 36px; height: 36px; border-radius: 50%; background: var(--pp-soft); flex: none; }
.pp-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-nav { display: flex; gap: 28px; flex-wrap: wrap; }
.pp .pp-nav a { color: var(--pp-text); text-decoration: none; font-weight: 500; font-size: 15px; }
.pp .pp-nav a:hover { color: var(--pp-ink); }

/* ---------- Шапка: обложка и профиль ---------- */
.pp-hero { position: relative; }
.pp-cover {
    position: relative;
    height: 340px;
    border-radius: 28px;
    overflow: hidden;
    background: var(--pp-soft);
}
.pp-cover.is-empty {
    background:
        radial-gradient(circle at 20% 30%, color-mix(in srgb, var(--pp-color) 30%, transparent) 0 18%, transparent 19%),
        radial-gradient(circle at 78% 60%, color-mix(in srgb, var(--pp-color) 22%, transparent) 0 24%, transparent 25%),
        var(--pp-soft);
    height: 220px;
}
.pp-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* На обложку заходит только фото; название и кнопки — под обложкой */
.pp-profile {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding: 0 40px;
    position: relative;
}
.pp-avatar {
    width: 136px;
    height: 136px;
    margin-top: -88px;
    flex: none;
    border-radius: 50%;
    border: 6px solid #F6F4F1;
    background: var(--pp-soft);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--pp-display);
    font-size: 48px;
    font-weight: 700;
    color: var(--pp-color);
}
.pp-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-profile-text { flex: 1 1 380px; min-width: 0; padding-top: 2px; }
.pp-title {
    margin: 0;
    font-family: var(--pp-display);
    font-weight: 800;
    font-size: 46px;
    line-height: 1.08;
    letter-spacing: -0.025em;
    overflow-wrap: anywhere;
}
.pp-meta { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; margin-top: 10px; font-size: 15px; color: var(--pp-muted); }
.pp-meta-item { display: inline-flex; align-items: center; gap: 6px; }
.pp-online { display: inline-flex; align-items: center; gap: 8px; color: #1B7A45; font-weight: 600; }
.pp-online-dot { width: 8px; height: 8px; border-radius: 50%; background: #1F9D55; box-shadow: 0 0 0 4px rgba(31, 157, 85, .15); }
.pp-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding-top: 4px; }
.pp-tagline { margin: 22px 40px 0; max-width: 760px; font-size: 19px; line-height: 1.55; color: var(--pp-text); overflow-wrap: anywhere; }

.pp-links { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 40px 0; }
.pp .pp-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px 9px 9px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid var(--pp-line);
    color: var(--pp-ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
}
.pp .pp-link:hover { border-color: #CFC8DD; }
.pp-link-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex: none;
}
.pp-link-icon svg { width: 16px; height: 16px; }

/* ---------- Две колонки ---------- */
.pp-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 40px;
    align-items: start;
    margin-top: 48px;
}
.pp-content { display: flex; flex-direction: column; gap: 40px; min-width: 0; }
.pp-side { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.pp-pair { display: flex; gap: 24px; flex-wrap: wrap; }
.pp-pair > .pp-about { flex: 3 1 360px; min-width: 0; }
.pp-pair > .pp-info { flex: 2 1 240px; min-width: 0; }
.pp-pair > [hidden] { display: none; }

.pp-card { background: #ffffff; border-radius: 24px; padding: 32px; }
.pp-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.pp-section-note { font-size: 15px; color: var(--pp-muted); }
.pp-h2 { margin: 0 0 14px; font-family: var(--pp-display); font-weight: 800; font-size: 24px; line-height: 1.25; letter-spacing: -0.02em; }
.pp-section-head .pp-h2 { margin: 0; font-size: 26px; }
.pp-text { font-size: 17px; line-height: 1.65; color: var(--pp-text); overflow-wrap: anywhere; }

.pp-info .pp-h2 { font-size: 18px; }
.pp-info-item { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; font-weight: 600; font-size: 15px; line-height: 1.45; }
.pp-info-item svg { flex: none; margin-top: 1px; color: color-mix(in srgb, var(--pp-color) 75%, #1D1B24); }

/* ---------- Мои работы ---------- */
.pp-works { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pp-works.is-featured > .pp-work:first-child { grid-column: span 2; grid-row: span 2; }
.pp-work { position: relative; min-width: 0; }
.pp-work-open {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1;
    padding: 0;
    border: 0;
    border-radius: 20px;
    overflow: hidden;
    background: var(--pp-soft);
    cursor: pointer;
}
.pp-work-open img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.pp-work-open:hover img { transform: scale(1.03); }
.pp-work-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}
.pp-work-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 52px;
    height: 52px;
    margin: -26px 0 0 -26px;
    border-radius: 50%;
    background: rgba(29, 27, 36, .62);
    color: #ffffff;
    font-size: 18px;
    line-height: 52px;
    text-align: center;
    padding-left: 3px;
}
.pp-work-caption {
    position: absolute;
    left: 12px;
    bottom: 12px;
    max-width: calc(100% - 24px);
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(29, 27, 36, .72);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Вопросы ---------- */
.pp-faq { border-bottom: 1px solid #ECE8F2; }
.pp-faq:last-of-type { border-bottom: 0; }
.pp-faq summary {
    padding: 16px 32px 16px 0;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    position: relative;
}
.pp-faq summary::-webkit-details-marker { display: none; }
.pp-faq summary::after { content: "+"; position: absolute; right: 0; top: 12px; font-size: 24px; font-weight: 400; color: var(--pp-muted); }
.pp-faq[open] summary::after { content: "−"; }
.pp-faq .pp-text { padding-bottom: 16px; font-size: 16px; }

/* ---------- Квиз: карточка на странице ---------- */
.pp-quiz { position: relative; background: var(--pp-dark); color: #ffffff; border-radius: 24px; padding: 28px; }
.pp-quiz-kicker { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #C9BEF5; }
.pp-quiz-title { margin: 8px 0 6px; font-family: var(--pp-display); font-weight: 800; font-size: 24px; line-height: 1.2; letter-spacing: -0.02em; }
.pp-quiz-intro { margin: 0 0 18px; font-size: 15px; color: #CFCAD9; }
.pp-quiz-q { font-size: 16px; font-weight: 600; margin: 4px 0 12px; }
.pp-quiz-options { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-quiz-option {
    padding: 11px 16px;
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid #4A4558;
    background: transparent;
    color: #ffffff;
    font: inherit;
    font-size: 15px;
    cursor: pointer;
    text-align: left;
}
.pp-quiz-option:hover { border-color: var(--pp-color); background: color-mix(in srgb, var(--pp-color) 25%, transparent); }
.pp-quiz-start { width: 100%; margin-top: 4px; }

/* ---------- Чат ---------- */
.pp-chat-title { margin-bottom: 12px; font-size: 20px; }
.pp-chat-box { background: #ffffff; border-radius: 24px; overflow: hidden; border: 1px solid var(--pp-line); }
.pp-chat-box iframe { display: block; width: 100%; height: 520px; border: 0; }
.pp-chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid #ECE8F2; }
.pp-chat-head img { width: 40px; height: 40px; border-radius: 50%; background: var(--pp-soft); }
.pp-chat-head strong { display: block; font-size: 16px; }
.pp-chat-head span { display: block; font-size: 13px; color: #1B7A45; font-weight: 600; }

/* ---------- Подвал ---------- */
.pp-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 56px;
    padding: 24px 0 40px;
    border-top: 1px solid var(--pp-line);
    font-size: 14px;
}
.pp .pp-footer a { color: var(--pp-muted); }
.pp-bar { display: none; }

/* ---------- Окно квиза ---------- */
.pp-qz-dialog {
    width: min(880px, calc(100vw - 32px));
    max-height: calc(100dvh - 48px);
    padding: 0;
    border: 0;
    border-radius: 28px;
    background: #ffffff;
    color: #1D1B24;
    box-shadow: 0 30px 80px rgba(20, 18, 28, .35);
    font-family: Onest, sans-serif;
    overflow: hidden;
}
.pp-qz-dialog[open] { display: flex; }
.pp-qz-dialog::backdrop { background: rgba(20, 18, 28, .55); }
.pp-qz-aside { flex: 0 0 320px; background: #EEE9FB; }
.pp-qz-aside img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pp-qz { flex: 1; min-width: 0; min-height: 560px; padding: 32px 40px; display: flex; flex-direction: column; overflow-y: auto; }

/* Квиз внутри окна и на отдельной странице — один и тот же */
.pp-qz-head { display: flex; align-items: center; gap: 12px; }
.pp-qz-brand { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.pp .pp-qz-brand { color: var(--pp-ink); }
.pp-qz-brand img { width: 40px; height: 40px; border-radius: 50%; background: #EEE9FB; flex: none; }
.pp-qz-brand > span { min-width: 0; }
.pp-qz-brand small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) {
    /* Узкий экран: счётчик вопросов — под шапкой, чтобы не наезжал на название */
    .pp-qz-head { flex-wrap: wrap; }
    .pp-qz-counter { order: 5; width: 100%; margin-top: 2px; font-size: 13px; }
}
.pp-qz-brand strong { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-qz-brand small { display: block; font-size: 13px; color: color-mix(in srgb, var(--pp-color, #6D4FD6) 70%, #1D1B24); }
.pp-qz-counter { font-size: 14px; font-weight: 600; color: #5E5A6B; white-space: nowrap; }
.pp-qz-icon {
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 50%;
    border: 0;
    background: #F1EEF6;
    color: #1D1B24;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.pp-qz-progress { height: 6px; border-radius: 6px; background: #ECE8F2; margin-top: 14px; overflow: hidden; }
.pp-qz-progress span { display: block; height: 100%; border-radius: 6px; background: var(--pp-color, #6D4FD6); transition: width .3s; }
.pp-qz-body { display: flex; flex-direction: column; flex: 1; padding-top: 28px; }
.pp-qz-kicker { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: color-mix(in srgb, var(--pp-color, #6D4FD6) 80%, #1D1B24); }
.pp-qz-title { margin: 10px 0 8px; font-family: Manrope, Onest, sans-serif; font-weight: 800; font-size: 28px; line-height: 1.2; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.pp-qz-hint { margin: 0 0 22px; font-size: 16px; color: #5E5A6B; }
.pp-qz-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pp-qz-option {
    min-height: 56px;
    padding: 16px 18px;
    border-radius: 16px;
    border: 1.5px solid #DDD8E8;
    background: #ffffff;
    color: #1D1B24;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}
.pp-qz-option:hover { border-color: var(--pp-color, #6D4FD6); }
.pp-qz-option.is-picked { border-color: var(--pp-color, #6D4FD6); background: color-mix(in srgb, var(--pp-color, #6D4FD6) 10%, #ffffff); }
.pp-qz-label { display: block; margin: 14px 0 6px; font-size: 14px; font-weight: 600; }
.pp-qz-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1.5px solid #DDD8E8;
    background: #ffffff;
    color: #1D1B24;
    font: inherit;
    font-size: 16px;
}
.pp-qz-input:focus { outline: none; border-color: var(--pp-color, #6D4FD6); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pp-color, #6D4FD6) 18%, transparent); }
textarea.pp-qz-input { resize: vertical; }
.pp-qz-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-qz-chip { padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--pp-color, #6D4FD6) 12%, #ffffff); color: color-mix(in srgb, var(--pp-color, #6D4FD6) 70%, #1D1B24); font-size: 13px; font-weight: 600; }
.pp-qz-form { display: flex; flex-direction: column; flex: 1; }
.pp-qz-via { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-qz-via-item {
    padding: 10px 14px;
    min-height: 44px;
    border-radius: 12px;
    border: 1.5px solid #DDD8E8;
    background: #ffffff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #1D1B24;
    cursor: pointer;
}
.pp-qz-via-item.is-picked { border-color: var(--pp-color, #6D4FD6); background: color-mix(in srgb, var(--pp-color, #6D4FD6) 10%, #ffffff); color: color-mix(in srgb, var(--pp-color, #6D4FD6) 70%, #1D1B24); }
.pp-qz-error { margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; background: #FDECEF; color: #A31D3B; font-size: 14px; }
.pp-qz-error[hidden] { display: none; }
.pp-qz-next { margin-top: auto; width: 100%; }
.pp-qz-form .pp-qz-next, .pp-qz-body > .pp-qz-next { margin-top: 22px; }
.pp-qz-note { margin: 10px 0 0; font-size: 12px; line-height: 1.5; color: #5E5A6B; text-align: center; }
.pp-qz-done { align-items: center; text-align: center; justify-content: center; }
.pp-qz-done-icon { width: 88px; height: 88px; border-radius: 50%; background: #E3F4EA; color: #1B7A45; display: flex; align-items: center; justify-content: center; }
.pp-qz-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 360px; margin-top: 8px; }
.pp-qz .pp-btn-primary { background: var(--pp-color, #6D4FD6); color: var(--pp-on-color, #ffffff); }
.pp-qz .pp-btn-light { background: #ffffff; color: #1D1B24; border-color: #DDD8E8; }

/* ---------- Просмотр работы ---------- */
.pp-lightbox {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(10, 12, 18, .94);
    color: #ffffff;
}
.pp-lightbox[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pp-lightbox::backdrop { background: rgba(10, 12, 18, .94); }
.pp-lb-stage { display: flex; align-items: center; justify-content: center; width: 100%; max-width: 960px; height: calc(100% - 110px); padding: 0 12px; }
.pp-lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.pp-lb-stage iframe { border: 0; border-radius: 12px; background: #000; width: 100%; height: 100%; }
.pp-lb-stage.is-video iframe { height: auto; aspect-ratio: 16 / 9; max-height: 100%; }
.pp-lb-stage.is-vertical iframe { width: auto; height: 100%; aspect-ratio: 9 / 16; max-width: 100%; background: #fff; }
.pp-lb-stage.is-post iframe { width: 100%; max-width: 540px; height: 100%; background: #fff; }
.pp-lb-caption { margin: 10px 16px 0; max-width: 640px; font-size: 14px; text-align: center; opacity: .9; min-height: 1em; font-family: Onest, sans-serif; }
.pp-lb-close, .pp-lb-nav { position: absolute; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #ffffff; cursor: pointer; z-index: 2; }
.pp-lb-close { top: calc(12px + env(safe-area-inset-top)); right: 12px; width: 44px; height: 44px; font-size: 18px; }
.pp-lb-nav { top: 50%; width: 44px; height: 44px; margin-top: -22px; font-size: 28px; line-height: 40px; }
.pp-lb-prev { left: 8px; }
.pp-lb-next { right: 8px; }
.pp-lb-nav[hidden] { display: none; }

/* ---------- Планшет ---------- */
@media (max-width: 1080px) {
    .pp-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; }
    .pp-title { font-size: 36px; }
}

/* ---------- Телефон ---------- */
@media (max-width: 760px) {
    .pp { padding: 0 20px; }
    .pp-top { padding: 14px 0; }
    .pp-nav { display: none; }
    .pp-cover { height: 210px; margin: 0 -20px; border-radius: 0; }
    .pp-cover.is-empty { height: 150px; }
    .pp-profile { padding: 0; margin-top: 0; gap: 12px; flex-direction: column; align-items: flex-start; }
    .pp-avatar { width: 104px; height: 104px; margin-top: -54px; border-width: 5px; font-size: 38px; }
    .pp-title { font-size: 28px; line-height: 1.15; }
    .pp-meta { font-size: 14px; gap: 14px; margin-top: 8px; }
    .pp-profile-text { flex: none; width: 100%; padding: 0; }
    .pp-cta { display: none; }
    .ppe .pp-cta { display: flex; }
    .pp-tagline { margin: 14px 0 0; font-size: 16px; }
    .pp-links { margin: 18px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
    .pp .pp-link { flex-direction: column; gap: 6px; padding: 12px 4px; border-radius: 16px; border: 0; font-size: 12px; text-align: center; }
    .pp-link-icon { width: 36px; height: 36px; }
    .pp-link-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

    /* Одна колонка: блоки двух колонок встают по порядку — квиз сразу после шапки */
    .pp-layout { display: flex; flex-direction: column; gap: 24px; margin-top: 24px; }
    .pp-content, .pp-side, .pp-pair { display: contents; }
    .pp-side { position: static; }
    [data-section="quiz"] { order: 1; }
    [data-section="works"] { order: 2; }
    [data-section="about"] { order: 3; }
    [data-section="info"] { order: 4; }
    [data-section="faq"] { order: 5; }
    [data-section="chat"] { order: 6; }

    .pp-card { padding: 22px; border-radius: 22px; }
    .pp-h2 { font-size: 20px; }
    .pp-section-head .pp-h2 { font-size: 20px; }
    .pp-section-note { font-size: 13px; }
    .pp-text { font-size: 15px; }
    .pp-quiz { padding: 22px; }
    .pp-quiz-title { font-size: 20px; }
    .pp-quiz-options { flex-direction: column; }
    .pp-quiz-option { padding: 14px 16px; border-radius: 14px; }

    /* Работы — лента, листается пальцем (в редакторе — сетка, чтобы помещались кнопки правки) */
    .pp-works:not(.is-edit) { display: flex; overflow-x: auto; gap: 10px; margin: 0 -20px; padding: 0 20px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
    .pp-works:not(.is-edit)::-webkit-scrollbar { display: none; }
    .pp-works:not(.is-edit) > .pp-work { flex: none; width: 46%; scroll-snap-align: start; }
    .pp-works:not(.is-edit) .pp-work-open { aspect-ratio: 4 / 5; border-radius: 18px; }
    .pp-works.is-edit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pp-works.is-featured > .pp-work:first-child { grid-column: auto; grid-row: auto; }

    .pp-chat-box iframe { height: 480px; }
    .pp-footer { margin-top: 32px; padding-bottom: 100px; justify-content: center; text-align: center; }

    .pp-bar {
        display: flex;
        gap: 10px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 20;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
        background: #ffffff;
        border-top: 1px solid var(--pp-line);
    }
    .pp-bar { padding: 17px 96px calc(17px + env(safe-area-inset-bottom)) 16px; }
    .pp-bar .pp-btn { flex: 1; }
    .pp .pp-bar-chat {
        width: 54px;
        flex: none;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 14px;
        background: var(--pp-soft);
        color: color-mix(in srgb, var(--pp-color) 75%, #1D1B24);
    }

    /* Окно квиза на телефоне — на весь экран */
    .pp-qz-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; margin: 0; }
    .pp-qz-aside { display: none; }
    .pp-qz { padding: 18px 20px calc(20px + env(safe-area-inset-bottom)); min-height: 0; }
    .pp-qz-title { font-size: 24px; }
    .pp-qz-options { grid-template-columns: 1fr; }
}
