/* ===== Страница «Интеграция с маркетплейсами»: табло синхронизации ===== */

.mp {
    --gold: #ce9248;
    --gold-light: #f3d3a3;
    --amber: #f5c26b;
    --cream: #f1e3d3;
    --muted: #a79c8f;
    --ink: #1a1108;
    --line: rgba(255, 255, 255, .09);
    --tile: #17140f;
    --glow: 0 0 5px rgba(255, 255, 255, .8);
    --display: "EB Garamond", Georgia, serif;
    --board: Oswald, "Arial Narrow", Arial, sans-serif;
    --ui: Montserrat, Arial, sans-serif;

    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    color: var(--cream);
    font-family: var(--ui);
    -webkit-user-select: text;
    user-select: text;
}

.mp p {
    margin: 0;
}

/* --- общие элементы --- */
.mp-tag {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 3px;
    background: var(--tile);
    box-shadow: inset 0 0 0 1px rgba(245, 194, 107, .25);
    font-family: var(--board);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--amber);
}

.mp-h2 {
    max-width: 760px;
    margin: 14px 0 34px;
    font-family: var(--display);
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 600;
    line-height: 1.1;
    color: var(--cream);
    text-align: left;
    text-wrap: balance;
}

.mp-section {
    margin-top: 110px;
}

.mp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.mp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 26px;
    border-radius: 3px;
    font: 600 16px/1 var(--board);
    letter-spacing: .1em;
    text-transform: uppercase;
    text-decoration: none;
    transition: transform .3s ease, box-shadow .3s ease, color .3s;
}

.mp-btn:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 3px;
}

.mp-btn--gold {
    color: var(--ink);
    background: linear-gradient(135deg, var(--gold-light), var(--gold) 60%, #9c6528);
    box-shadow: 0 10px 30px -12px rgba(206, 146, 72, .9);
}

.mp-btn--gold:hover {
    transform: translateY(-2px);
}

.mp-btn--ghost {
    color: var(--cream);
    background: #000;
    box-shadow: var(--glow);
}

.mp-btn--ghost:hover {
    color: #fff;
    box-shadow: 0 0 12px rgba(255, 255, 255, .9);
}

/* --- первый экран --- */
.mp-hero {
    margin-top: 30px;
}

.mp-hero__head {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 48px;
    align-items: end;
}

.mp-hero__title {
    margin: 18px 0 0;
    font-family: var(--display);
    font-size: clamp(40px, 5.4vw, 68px);
    font-weight: 600;
    line-height: 1.02;
    color: var(--cream);
    text-align: left;
    text-wrap: balance;
}

.mp-hero__title em {
    font-style: italic;
    background: linear-gradient(40deg, #fff, #d4a729);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mp .mp-hero__lead {
    margin-bottom: 24px;
    font-size: 17px;
    line-height: 1.65;
    color: var(--muted);
}

/* табло */
.mp-board {
    margin-top: 50px;
    padding: 18px 22px 16px;
    border-radius: 10px;
    background: #070605;
    box-shadow: var(--glow), inset 0 0 40px rgba(0, 0, 0, .8);
}

.mp-board__row {
    display: grid;
    grid-template-columns: 1.3fr 1.3fr 1.2fr .6fr .9fr;
    gap: 16px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    font-family: var(--board);
    font-size: 20px;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--amber);
}

.mp-board__head {
    padding-top: 0;
    font-size: 12px;
    letter-spacing: .16em;
    color: var(--muted);
}

.mp-board__row--src {
    color: #fff;
}

.mp-board__place {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.mp-board__place i {
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--c);
    box-shadow: 0 0 8px var(--c);
}

.mp-board__item {
    color: var(--cream);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mp-board__status {
    font-size: 15px;
    color: #8fbf7a;
    white-space: nowrap;
}

.mp-board__row--src .mp-board__status {
    color: var(--muted);
}

.mp-board__status.is-busy {
    color: var(--amber);
    animation: mp-blink .5s steps(1) infinite;
}

@keyframes mp-blink {
    50% { opacity: .3; }
}

.mp .mp-board__note {
    margin-top: 12px;
    font-size: 12px;
    color: #6f6961;
}

/* плитки-перевёртыши */
.mp-flap {
    display: inline-flex;
    gap: 2px;
}

.mp-flap__ch {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: .78em;
    height: 1.45em;
    border-radius: 3px;
    background: linear-gradient(180deg, #1d1912 0 49%, #0f0d09 51% 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04);
    line-height: 1;
}

.mp-flap__ch:after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: rgba(0, 0, 0, .8);
}

.mp-flap__ch.is-flip {
    animation: mp-flip .12s linear;
}

@keyframes mp-flip {
    0%   { transform: rotateX(0); }
    50%  { transform: rotateX(90deg); filter: brightness(1.6); }
    100% { transform: rotateX(0); }
}

/* --- калькулятор --- */
.mp-calc {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 56px;
    align-items: center;
}

.mp-calc__text > p:last-child {
    font-size: 17px;
    line-height: 1.65;
    color: var(--muted);
}

.mp-calc__box {
    padding: 28px;
    border-radius: 10px;
    background: #070605;
    box-shadow: var(--glow);
}

.mp-calc__label {
    display: block;
    margin-bottom: 14px;
    font-size: 15px;
    color: var(--muted);
}

.mp-calc__label b {
    font-family: var(--board);
    font-size: 26px;
    font-weight: 600;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.mp-calc__range {
    width: 100%;
    height: 6px;
    margin: 0 0 22px;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--gold) var(--fill, 20%), rgba(255, 255, 255, .1) var(--fill, 20%));
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.mp-calc__range::-webkit-slider-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gold-light);
    box-shadow: 0 0 12px var(--gold);
    -webkit-appearance: none;
    appearance: none;
}

.mp-calc__range::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    background: var(--gold-light);
    box-shadow: 0 0 12px var(--gold);
}

.mp-calc__range:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 6px;
}

.mp-calc__rows {
    display: grid;
    gap: 8px;
}

.mp-calc__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 110px;
    gap: 14px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 6px;
    background: var(--tile);
}

.mp-calc__name {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #fff;
}

.mp-calc__name i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--c);
}

.mp-calc__markup {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--board);
    font-size: 16px;
    color: var(--amber);
}

.mp-calc__markup button {
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 4px;
    background: rgba(255, 255, 255, .06);
    color: var(--cream);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.mp-calc__markup button:hover {
    background: rgba(206, 146, 72, .3);
}

.mp-calc__markup button:focus-visible {
    outline: 2px solid var(--gold-light);
}

.mp-calc__markup output {
    min-width: 2ch;
    text-align: right;
}

.mp-calc__price {
    font-family: var(--board);
    font-size: 20px;
    font-weight: 600;
    text-align: right;
    color: var(--amber);
    font-variant-numeric: tabular-nums;
}

.mp .mp-calc__note {
    margin-top: 14px;
    font-size: 12px;
    color: #6f6961;
}

/* --- билеты --- */
.mp-tickets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    list-style: none;
}

.mp-ticket {
    --notch: 12px;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 128px;
    border-radius: 10px;
    background:
        radial-gradient(circle at calc(100% - 128px) 0, #010101 var(--notch), transparent calc(var(--notch) + .5px)),
        radial-gradient(circle at calc(100% - 128px) 100%, #010101 var(--notch), transparent calc(var(--notch) + .5px)),
        linear-gradient(135deg, #1c1711, #0c0a07);
    box-shadow: inset 0 0 0 1px rgba(245, 194, 107, .18);
    transition: transform .3s ease;
}

.mp-ticket:hover {
    transform: translateY(-3px) rotate(-.4deg);
}

.mp-ticket__main {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px 22px;
}

.mp-ticket__main b {
    font-size: 19px;
    color: #fff;
}

.mp-ticket__main span {
    font-size: 15px;
    line-height: 1.55;
    color: var(--muted);
}

.mp-ticket__stub {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 18px 14px;
    border-left: 2px dashed rgba(245, 194, 107, .3);
    font-family: var(--board);
    font-size: 15px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--amber);
}

.mp-ticket__stub small {
    font-family: var(--ui);
    font-size: 10px;
    letter-spacing: .14em;
    color: var(--muted);
}

/* --- расписание --- */
.mp-timetable {
    border-top: 2px solid rgba(245, 194, 107, .4);
    list-style: none;
}

.mp-timetable li {
    display: grid;
    grid-template-columns: 70px 240px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.mp-timetable__code {
    display: grid;
    place-items: center;
    width: 44px;
    height: 56px;
    border-radius: 4px;
    background: linear-gradient(180deg, #1d1912 0 49%, #0f0d09 51% 100%);
    font-family: var(--board);
    font-size: 28px;
    font-weight: 600;
    color: var(--amber);
}

.mp-timetable b {
    font-family: var(--board);
    font-size: 20px;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #fff;
}

.mp-timetable li > span:last-child {
    font-size: 15px;
    line-height: 1.55;
    color: var(--muted);
}

/* --- вопросы --- */
.mp-faq .faq {
    max-width: 820px;
}

/* --- финал --- */
.mp-final {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 120px;
    padding: 56px 24px;
    border-radius: 10px;
    text-align: center;
    background: #070605;
    box-shadow: var(--glow);
}

.mp-final__board {
    margin-bottom: 26px;
    font-family: var(--board);
    font-size: clamp(22px, 4vw, 36px);
    font-weight: 600;
    color: var(--amber);
}

.mp-final .mp-h2 {
    margin: 0 0 14px;
    text-align: center;
}

.mp-final > p:not(.mp-final__board) {
    max-width: 520px;
    margin-bottom: 28px;
    font-size: 17px;
    line-height: 1.6;
    color: var(--muted);
}

.mp-final .mp-actions {
    justify-content: center;
}

/* --- адаптив --- */
@media (max-width: 960px) {
    .mp-hero__head,
    .mp-calc {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .mp-tickets {
        grid-template-columns: 1fr;
    }

    .mp-timetable li {
        grid-template-columns: 60px minmax(0, 1fr);
    }

    .mp-timetable li > span:last-child {
        grid-column: 2;
    }
}

@media (max-width: 760px) {
    /* на узком экране табло без колонки «Товар» и крупнее */
    .mp-board {
        padding: 14px 14px 12px;
    }

    .mp-board__row {
        grid-template-columns: 1.2fr 1.3fr .6fr;
        gap: 10px;
        font-size: 16px;
    }

    .mp-board__row > :nth-child(2),
    .mp-board__row > :nth-child(5) {
        display: none;
    }
}

@media (max-width: 640px) {
    .mp {
        padding: 20px 16px 60px;
    }

    .mp-section,
    .mp-final {
        margin-top: 80px;
    }

    .mp-board__row {
        font-size: 14px;
    }

    .mp-calc__box {
        padding: 20px 16px;
    }

    .mp-calc__row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .mp-calc__price {
        grid-column: 1 / -1;
        text-align: left;
    }

    .mp-ticket {
        grid-template-columns: minmax(0, 1fr) 96px;
        background:
            radial-gradient(circle at calc(100% - 96px) 0, #010101 var(--notch), transparent calc(var(--notch) + .5px)),
            radial-gradient(circle at calc(100% - 96px) 100%, #010101 var(--notch), transparent calc(var(--notch) + .5px)),
            linear-gradient(135deg, #1c1711, #0c0a07);
    }

    .mp-ticket__stub {
        font-size: 12px;
    }

    .mp-btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mp *,
    .mp *:before,
    .mp *:after {
        animation: none !important;
        transition: none !important;
    }
}
