:root {
    --topbar-h: 2.5cm;
    --topbar-gap: 20px;
    --panel-bg: rgba(28,28,32,0.96);
    --panel-accent: #ffd76a;
}
@media (max-width: 768px) {
    :root {
        --topbar-h: 1.5cm;
        --topbar-gap: 12px;
    }
}

html, body {
    margin: 0; padding: 0; overflow: hidden;
    width: 100%; height: 100%;
    background: #000; cursor: grab; font-family: sans-serif;
    touch-action: manipulation;
    -ms-touch-action: manipulation;
}

body > canvas {
    display: block;
    touch-action: none;
    -ms-touch-action: none;
}

body:active { cursor: grabbing; }

#topBar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--topbar-h);
    background: #ffcf00;
    z-index: 55;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}
#topBarLogo {
    width: var(--topbar-h);
    height: var(--topbar-h);
    display: block;
    object-fit: contain;
    flex: 0 0 auto;
}
#topBarText {
    margin-left: 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1;
    color: #1a1a1a;
    font-family: 'Cinzel', 'Albertus Extra Bold', 'Albertus', Georgia, serif;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}
#topBarTitle {
    font-weight: 900;
    font-size: calc(var(--topbar-h) * 0.55);
    letter-spacing: 0.03em;
}

#topBarButtons {
    margin-left: auto;
    margin-right: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.topbar-btn {
    width: calc(var(--topbar-h) * 0.6);
    height: calc(var(--topbar-h) * 0.6);
    padding: 0;
    background: transparent;
    border: 2px solid #1a1a1a;
    border-radius: 8px;
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transition: background 0.15s, transform 0.1s;
}
.topbar-btn:hover { background: rgba(0,0,0,0.08); }
.topbar-btn:active { transform: scale(0.94); }
.topbar-btn svg {
    width: 62%;
    height: 62%;
    display: block;
}

.topbar-cart {
    position: relative;
}
.cart-badge {
    position: absolute;
    top: -13px;
    left: -13px;
    min-width: 27px;
    height: 27px;
    padding: 0 6px;
    background: rgb(255, 102, 0);
    color: #1a1a1a;
    font-family: sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.45);
    z-index: 1;
}

.lang-select {
    height: calc(var(--topbar-h) * 0.6);
    padding: 0 34px 0 14px;
    background-color: transparent;
    border: 2px solid #1a1a1a;
    border-radius: 8px;
    color: #1a1a1a;
    font-family: 'Cinzel', 'Albertus Extra Bold', 'Albertus', Georgia, serif;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.04em;
    line-height: 1;
    cursor: pointer;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px 14px;
    transition: background-color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.lang-select:hover { background-color: rgba(0,0,0,0.08); }
.lang-select:active { transform: scale(0.97); }
.lang-select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(26,26,26,0.35);
}
.lang-select option {
    background: #1c1c20;
    color: #fff;
    font-family: sans-serif;
    font-weight: 400;
    letter-spacing: normal;
}

@media (max-width: 768px) {
    .lang-select {
        font-size: 12px;
        padding: 0 24px 0 9px;
        background-position: right 6px center;
        background-size: 11px 11px;
    }
}

#markersLayer {
    position: absolute; inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 15;
}
.marker {
    position: absolute;
    pointer-events: auto;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
    will-change: left, top;
}

.marker.obj {
    transform: translate(-50%, -100%);
    width: 34px; height: 44px;
    display: flex; align-items: flex-start; justify-content: center;
    filter: drop-shadow(0 3px 4px rgba(0,0,0,0.6));
}
.marker.obj svg { width: 34px; height: 44px; overflow: visible; }
.marker.obj:hover { transform: translate(-50%, -100%) scale(1.15); }
.marker.obj .pin-shape { fill: #FFB300; transition: fill 0.15s; }
.marker.obj:hover .pin-shape { fill: #FFC107; }

.marker.nav {
    transform: translate(-50%, -50%);
    width: 138px; height: 81px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(30, 110, 200, 0.85) 0%, rgba(20, 90, 180, 0.72) 45%, rgba(15, 70, 150, 0.35) 78%, rgba(15, 70, 150, 0.00) 100%);
    box-shadow: 0 0 32px 6px rgba(20, 90, 180, 0.50);
    filter: blur(1.8px);
}
.marker.nav:hover {
    transform: translate(-50%, -50%) scale(1.12);
    background: radial-gradient(ellipse at center, rgba(40, 140, 235, 0.95) 0%, rgba(25, 115, 210, 0.85) 45%, rgba(20, 90, 180, 0.45) 78%, rgba(20, 90, 180, 0.00) 100%);
}

.info-panel,
.cart-panel {
    position: fixed;
    top: calc(var(--topbar-h) + var(--topbar-gap));
    left: 20px;
    width: 570px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - var(--topbar-h) - var(--topbar-gap) - 20px);
    background: var(--panel-bg);
    color: #fff;
    border-radius: 26px;
    padding: 30px 36px 33px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.65);
    z-index: 60;
    transform: translateX(-720px);
    opacity: 0; pointer-events: none;
    transition: transform 0.35s cubic-bezier(.2,.9,.3,1), opacity 0.25s;
    overflow-y: auto;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,215,106,0.75) rgba(255,255,255,0.07);
}

@media (min-width: 769px) {
    .info-panel,
    .cart-panel {
        width: 456px;
        padding: 24px 29px 26px;
        border-radius: 22px;
    }
}

@media (max-width: 768px) {
    .info-panel,
    .cart-panel {
        max-height: calc(100vh - var(--topbar-h) - var(--topbar-gap) - 20px);
        max-height: calc(100dvh - var(--topbar-h) - var(--topbar-gap) - 20px - env(safe-area-inset-bottom, 0px));
        padding-bottom: calc(33px + env(safe-area-inset-bottom, 0px));
    }
}

.info-panel.open,
.cart-panel.open {
    transform: translateX(0);
    opacity: 1; pointer-events: auto;
}

.info-panel.no-download .panel-download,
.info-panel.no-download .license-row { display: none; }

.info-panel::-webkit-scrollbar,
.cart-panel::-webkit-scrollbar,
.start-banner::-webkit-scrollbar,
.advisor-panel::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
.info-panel::-webkit-scrollbar-track,
.cart-panel::-webkit-scrollbar-track,
.start-banner::-webkit-scrollbar-track,
.advisor-panel::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
}
.info-panel::-webkit-scrollbar-thumb,
.cart-panel::-webkit-scrollbar-thumb,
.start-banner::-webkit-scrollbar-thumb,
.advisor-panel::-webkit-scrollbar-thumb {
    background: rgba(255,215,106,0.55);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
.info-panel::-webkit-scrollbar-thumb:hover,
.cart-panel::-webkit-scrollbar-thumb:hover,
.start-banner::-webkit-scrollbar-thumb:hover,
.advisor-panel::-webkit-scrollbar-thumb:hover {
    background: var(--panel-accent);
    background-clip: padding-box;
}
.info-panel::-webkit-scrollbar-corner,
.cart-panel::-webkit-scrollbar-corner,
.start-banner::-webkit-scrollbar-corner,
.advisor-panel::-webkit-scrollbar-corner {
    background: transparent;
}

.panel-close {
    position: absolute; top: 14px; right: 16px;
    width: 44px; height: 44px;
    padding: 0;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255,255,255,0.1);
    color: #fff; border: none; border-radius: 50%;
    font-size: 28px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.panel-close:hover { background: rgba(255,255,255,0.25); }

/* ==== Бейдж цены на карточке — под картинкой, над описанием ==== */
.price-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 14px;
    border-radius: 18px;
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.15s, opacity 0.15s;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
    margin: 0 0 16px 0;   /* отступ снизу — чтобы не слипался с текстом */
    line-height: 1;
}
.price-badge:hover {
    transform: scale(1.05);
}
.price-badge:active {
    transform: scale(0.95);
}
.price-badge.free {
    width: 36px;
    padding: 0;
    border-radius: 50%;
    background: #7bc91a;       /* ← ЗЕЛЁНЫЙ фон (бесплатно, галочка) */
}
.price-badge.free:hover {
    background: #7bc91a;        /* ← ЗЕЛЁНЫЙ на hover */
}
.price-badge.paid {
    background: #7621ed;         /* ← ФИОЛЕТОВЫЙ фон (платно, N POL) */
}
.price-badge.paid:hover {
    background: #7621ed;         /* ← ФИОЛЕТОВЫЙ на hover */
}

.panel-title {
    display: block; width: 100%;
    color: #ffd76a; font-size: 28px; font-weight: 700;
    padding: 0 50px 13px 0;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    margin-bottom: 20px;
    box-sizing: border-box;
    word-wrap: break-word;
}
.panel-image {
    display: none;
    width: 100%;
    height: auto;
    max-height: 50vh;
    object-fit: contain;
    border-radius: 15px;
    margin: 0 0 20px 0;
    background: rgba(255,255,255,0.04);
    box-sizing: border-box;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    touch-action: pan-y;
}
.panel-image.single { cursor: default; }

.panel-dots {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: -10px 0 20px 0;
    pointer-events: none;
}
.panel-dots.show { display: flex; }
.panel-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    transition: background 0.15s;
    pointer-events: none;
}
.panel-dots .dot.active { background: #ffd76a; }

.panel-spinner {
    display: none;
    width: 100%;
    height: 210px;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    margin: 0 0 20px 0;
    background: rgba(255,255,255,0.04);
    box-sizing: border-box;
}
.panel-spinner.show { display: flex; }
.spinner-ring {
    width: 62px; height: 62px;
    border: 6px solid rgba(255, 215, 106, 0.22);
    border-top-color: #ffd76a;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

.panel-content {
    font-size: 21px; line-height: 1.6;
    color: #e8e8e8;
    min-height: 66px;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.panel-content:empty::before {
    content: attr(data-placeholder);
    color: #777;
}

.cart-empty {
    padding: 28px 0 24px;
    text-align: center;
    color: #888;
    font-size: 17px;
    line-height: 1.5;
}

.cart-list {
    margin: 0;
    padding: 0;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    box-sizing: border-box;
}
.cart-item:last-child {
    border-bottom: none;
}
.cart-item-name {
    flex: 1 1 auto;
    color: #e8e8e8;
    font-size: 17px;
    line-height: 1.4;
    word-break: break-word;
    min-width: 0;
}
.cart-item-del {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    padding: 0;
    background: rgba(255,255,255,0.08);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-family: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.1s;
}
.cart-item-del:hover { background: rgba(229,57,53,0.55); }
.cart-item-del:active { transform: scale(0.92); }

/* Новый блок итоговой суммы */
.cart-total {
    text-align: right;
    font-size: 22px;
    font-weight: 700;
    color: #ffd76a;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed rgba(255,255,255,0.2);
}

.license-row {
    margin-top: 27px;
}
.license-label {
    display: block;
    color: #cfcfcf;
    font-size: 15px;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}
.license-select {
    width: 100%;
    padding: 13px 44px 13px 16px;
    background-color: rgba(255,255,255,0.06);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 12px;
    font-size: 18px;
    font-family: inherit;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.15s, background-color 0.15s;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffd76a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px 18px;
}
.license-select:hover {
    background-color: rgba(255,255,255,0.10);
    border-color: rgba(255,215,106,0.55);
}
.license-select:focus {
    outline: none;
    border-color: #ffd76a;
    box-shadow: 0 0 0 2px rgba(255,215,106,0.25);
}
.license-select option {
    background: #1c1c20;
    color: #fff;
}

.license-info {
    display: none;
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.4;
    color: #9a9a9a;
    text-decoration: none;
    transition: color 0.15s;
    word-wrap: break-word;
}
.license-info.show { display: block; }
.license-info:hover { color: #ffd76a; }

.license-agree {
    display: none;
    margin-top: 14px;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1.4;
    color: #e8e8e8;
    user-select: none;
    -webkit-user-select: none;
}
.license-agree.show { display: flex; }
.license-agree input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 1px 0 0 0;
    accent-color: #ffd76a;
    cursor: pointer;
    flex: 0 0 auto;
}

.panel-download {
    display: block;
    width: 100%;
    margin-top: 27px;
    padding: 15px 24px;
    background: #ffd76a;
    color: #1a1a1a;
    border: none;
    border-radius: 15px;
    font-size: 21px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s, opacity 0.15s, filter 0.15s;
}
.panel-download:hover:not(:disabled)  { background: #ffc43a; }
.panel-download:active:not(:disabled) { transform: scale(0.98); }
.panel-download:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: saturate(0.25);
}

.info-panel .license-row + .panel-download { margin-top: 14px; }

#loaderOverlay {
    position: fixed; inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 90;
    cursor: wait;
}
#loaderOverlay.show { display: flex; }
.loader-ring {
    width: 96px; height: 96px;
    border: 9px solid rgba(255, 215, 106, 0.22);
    border-top-color: #ffd76a;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    filter: drop-shadow(0 0 12px rgba(255,215,106,0.35));
}

#toast {
    position: fixed;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(28,28,32,0.95);
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13px;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    box-shadow: 0 6px 20px rgba(0,0,0,0.55);
    white-space: nowrap;
}
#toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.start-banner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% + 20px));
    width: 570px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: var(--panel-bg);
    color: #fff;
    border-radius: 26px;
    padding: 34px 36px 30px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.65);
    z-index: 95;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(.2,.9,.3,1);
    scrollbar-width: thin;
    scrollbar-color: rgba(255,215,106,0.75) rgba(255,255,255,0.07);
}
.start-banner.show {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%);
}
.start-banner .panel-content {
    text-align: center;
    font-size: 21px;
    line-height: 1.6;
    color: #e8e8e8;
    min-height: 0;
}
.start-banner-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}
.start-banner-install-btn {
    width: 48px; height: 48px;
    padding: 0; border-radius: 50%;
    background: #ffcf00; color: #1a1a1a; border: none;
    box-sizing: border-box; display: none;
    align-items: center; justify-content: center;
    cursor: pointer; transition: background 0.15s, transform 0.1s;
    -webkit-appearance: none; appearance: none; flex: 0 0 auto;
}
.start-banner-install-btn.show { display: flex; }
.start-banner-install-btn:hover  { background: #ffd633; }
.start-banner-install-btn:active { transform: scale(0.94); }
.start-banner-install-btn svg { width: 58%; height: 58%; display: block; pointer-events: none; }
.start-banner .lang-select {
    height: 44px; font-size: 16px; padding: 0 36px 0 18px;
    background-position: right 13px center; background-size: 14px 14px;
    border-color: rgba(255,255,255,0.35); color: #ffd76a;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffd76a' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}
.start-banner .lang-select:hover { background-color: rgba(255,255,255,0.08); border-color: rgba(255,215,106,0.6); }
.start-banner .lang-select:focus { box-shadow: 0 0 0 2px rgba(255,215,106,0.25); border-color: #ffd76a; }
.start-banner .panel-download { display: flex; align-items: center; justify-content: center; padding: 12px 24px; }
.start-banner .panel-download svg { width: 34px; height: 34px; display: block; }

#advisorBtn {
    position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    width: 56px; height: 56px; padding: 0; border-radius: 50%;
    background: #ffcf00; color: #1a1a1a; border: none; display: none;
    align-items: center; justify-content: center; cursor: pointer; z-index: 62;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55); transition: background 0.15s, transform 0.1s;
    box-sizing: border-box;
}
#advisorBtn.show { display: flex; }
#advisorBtn:hover  { background: #ffd633; }
#advisorBtn:active { transform: scale(0.94); }
#advisorBtn svg { width: 58%; height: 58%; display: block; pointer-events: none; }

.advisor-panel-wrapper {
    --advisor-w: min(456px, calc(100vw - 40px));
    --advisor-img-size: calc(var(--advisor-w) - 20px);
    position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    width: var(--advisor-w); box-sizing: border-box; z-index: 61;
    opacity: 0; pointer-events: none; transform: scale(0.85); transform-origin: bottom right;
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(.2,.9,.3,1);
}
.advisor-panel-wrapper.open { opacity: 1; pointer-events: auto; transform: scale(1); }
.advisor-type-img {
    position: absolute; bottom: calc(100% - 5px); left: 50%; transform: translateX(-50%);
    width: var(--advisor-img-size); aspect-ratio: 1 / 1; height: auto; object-fit: contain;
    display: none; pointer-events: none; filter: drop-shadow(0 6px 16px rgba(0,0,0,0.6));
}
.advisor-type-img.show { display: block; }
.advisor-panel {
    position: relative; width: 100%;
    max-height: calc(100vh - var(--topbar-h) - var(--topbar-gap) - 20px - env(safe-area-inset-bottom, 0px));
    background: var(--panel-bg); color: #fff; border-radius: 22px; padding: 24px 29px 26px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.65); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    box-sizing: border-box; overflow-y: auto; scrollbar-width: thin;
    scrollbar-color: rgba(255,215,106,0.75) rgba(255,255,255,0.07);
}
.advisor-panel-wrapper.has-type-img .advisor-panel {
    max-height: calc(100vh - var(--topbar-h) - var(--topbar-gap) - 20px - var(--advisor-img-size) - env(safe-area-inset-bottom, 0px));
}
.advisor-buttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-start; }
.advisor-slot {
    width: 56px; height: 56px; padding: 0; border-radius: 50%; background: #555;
    border: none; box-sizing: border-box; -webkit-appearance: none; appearance: none;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    overflow: hidden; transition: background 0.15s, transform 0.1s;
}
.advisor-slot:hover  { background: #666; }
.advisor-slot:active { transform: scale(0.94); }
.advisor-slot:disabled { cursor: default; opacity: 1; }
.advisor-slot-img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; }
.advisor-gift-btn {
    position: absolute; top: -28px; left: 50%; transform: translateX(-50%);
    width: 56px; height: 56px; padding: 0; border-radius: 50%; background: #ffcf00;
    color: #1a1a1a; border: none; display: none; align-items: center; justify-content: center;
    cursor: pointer; z-index: 2; box-shadow: 0 4px 16px rgba(0,0,0,0.55); box-sizing: border-box;
    -webkit-appearance: none; appearance: none; transition: background 0.15s, transform 0.1s;
}
.advisor-gift-btn.show { display: flex; }
.advisor-gift-btn:hover  { background: #ffd633; }
.advisor-gift-btn:active { transform: translateX(-50%) scale(0.94); }
.advisor-gift-btn svg { width: 58%; height: 58%; display: block; pointer-events: none; }
.advisor-greeting { color: #e8e8e8; font-size: 16px; line-height: 1.5; margin: -8px 0 18px 0; white-space: pre-wrap; word-wrap: break-word; }
.advisor-greeting:empty { display: none; }

@media (max-width: 768px) {
    .advisor-panel-wrapper { --advisor-w: min(570px, calc(100vw - 40px)); }
    .advisor-panel { padding: 20px 24px calc(20px + env(safe-area-inset-bottom, 0px)); }
}

#coordLog {
    position: fixed; left: 12px; bottom: 12px; z-index: 105; display: none;
    background: #000; color: #888; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 11px; line-height: 1.4; padding: 3px 7px; white-space: nowrap;
    pointer-events: none; user-select: none; -webkit-user-select: none;
}
#coordLog.show { display: block; }
@media (max-width: 768px) { #coordLog { display: none !important; } }

.ios-install-hint {
    position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%) translateY(120%); width: calc(100vw - 32px); max-width: 480px;
    z-index: 96; opacity: 0; pointer-events: none;
    transition: transform 0.35s cubic-bezier(.2,.9,.3,1), opacity 0.25s ease;
    box-sizing: border-box;
}
.ios-install-hint--visible { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto; }
.ios-install-hint__body {
    display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px;
    background: var(--panel-bg); color: #fff; border-radius: 18px; box-shadow: 0 12px 40px rgba(0, 0, 0, .65);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-sizing: border-box;
    font-family: sans-serif; font-size: 14px; line-height: 1.35;
}
.ios-install-hint__icon { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 10px; display: block; object-fit: cover; }
.ios-install-hint__text { flex: 1 1 auto; min-width: 0; }
.ios-install-hint__text strong { display: block; color: #ffd76a; font-size: 15px; margin-bottom: 3px; font-weight: 700; }
.ios-install-hint__text p { margin: 0; color: #e8e8e8; font-size: 13.5px; line-height: 1.4; }
.ios-install-hint__text b { color: #ffd76a; font-weight: 700; }
.ios-install-hint__text svg { vertical-align: -3px; color: #ffd76a; }
.ios-install-hint__close {
    flex: 0 0 auto; width: 34px; height: 34px; padding: 0; background: rgba(255, 255, 255, 0.10);
    color: #fff; border: none; border-radius: 50%; font-family: sans-serif; font-size: 22px;
    line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
    box-sizing: border-box; -webkit-appearance: none; appearance: none; transition: background 0.15s, transform 0.1s;
}
.ios-install-hint__close:hover  { background: rgba(255, 255, 255, 0.25); }
.ios-install-hint__close:active { transform: scale(0.92); }

/* ==== Статусы в корзине ==== */
.cart-item-name-wrap {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cart-item-badge {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    font-size: 13px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 10px;
    line-height: 1.3;
    color: #fff;
}
.cart-item-badge.paid {
    background: #2e7d32;
}
.cart-item-badge.pending {
    background: #b8860b;
    animation: pulse-badge 1.4s ease-in-out infinite;
}
.cart-item-badge.unpaid {
    background: #8e24aa;
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

/* Внутри .cart-item заменим flex — теперь name-wrap растягивается */
.cart-item {
    align-items: flex-start;
}
.cart-item .cart-item-del {
    margin-top: 2px;
}