.nest-promo, .nest-promo * { box-sizing: border-box; }
.nest-promo[hidden], .nest-promo-inline-source[hidden] { display: none !important; }
.nest-promo {
    --np-color: #174c38;
    --np-end: #426626;
    --np-gold: #ffcf3f;
    --np-ink: #1c2a1a;
    --np-apple: #d6432c;
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 24px;
    border-radius: 18px;
    background: var(--np-color);
    color: #fff;
    font-family: inherit;
    text-align: left;
    overflow: hidden;
    line-height: 1.4;
    min-width: 0;
}
/* Лёгкая тень снизу и тёплый свет в углу вместо сплошного затемнения:
   цвет владельца остаётся ярким, а белый текст читается. */
.nest-promo::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(circle at 100% 0, rgba(255, 207, 63, .30), rgba(255, 207, 63, 0) 55%), linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .22)); }
/* Строчка по краю, как у этикетки на ящике с урожаем. */
.nest-promo::after { content: ''; position: absolute; inset: 7px; z-index: -1; pointer-events: none; border: 1.5px dashed rgba(255, 244, 214, .38); border-radius: 12px; }
.nest-promo--gradient { background: linear-gradient(135deg, var(--np-color), var(--np-end)); }
.nest-promo__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.nest-promo--image::before { background: linear-gradient(100deg, rgba(0,0,0,.78), rgba(0,0,0,.5)); }
.nest-promo__body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.nest-promo__label { display: inline-block; margin-bottom: 12px; padding: 5px 10px 4px; border-radius: 6px; background: var(--np-apple); color: #fff; font-size: 11px; line-height: 1.3; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; box-shadow: 0 2px 0 rgba(0,0,0,.18); }
.nest-promo__title { display: block; font-size: 23px; line-height: 1.18; letter-spacing: -.01em; font-weight: 600; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.18); text-wrap: balance; }
.nest-promo__description { display: block; font-size: 15px; line-height: 1.45; color: rgba(255, 250, 235, .92); margin-top: 8px; text-wrap: pretty; }
.nest-promo a.nest-promo__button {
    display: inline-flex;
    flex: 0 1 auto;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 100%;
    min-height: 48px;
    padding: 12px 22px;
    border: 0;
    border-radius: 12px;
    background: var(--np-gold);
    color: var(--np-ink);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    overflow-wrap: anywhere;
    box-shadow: 0 3px 0 #d9a514, 0 8px 18px rgba(0,0,0,.18);
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.nest-promo a.nest-promo__button::after { content: '→'; font-size: 18px; line-height: 1; transition: transform .15s ease; }
.nest-promo a.nest-promo__button:hover { background: #ffdb6b; color: var(--np-ink); transform: translateY(-1px); box-shadow: 0 4px 0 #d9a514, 0 10px 22px rgba(0,0,0,.2); }
.nest-promo a.nest-promo__button:hover::after { transform: translateX(3px); }
.nest-promo a.nest-promo__button:active { transform: translateY(2px); box-shadow: 0 1px 0 #d9a514, 0 4px 10px rgba(0,0,0,.18); }
.nest-promo button.nest-promo__close { position: absolute; top: 12px; right: 12px; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0 0 3px; border: 1.5px solid rgba(255,255,255,.55); border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-family: inherit; font-size: 32px; font-weight: 400; line-height: 1; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.nest-promo button.nest-promo__close:hover { background: #fff; color: var(--np-ink); }
.nest-promo a:focus-visible, .nest-promo button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.nest-promo--card { position: fixed; left: max(24px, env(safe-area-inset-left)); bottom: 90px; width: 360px; max-width: calc(100vw - 48px); max-height: calc(100dvh - 130px); overflow-y: auto; flex-direction: column; align-items: stretch; gap: 20px; padding: 24px 26px 26px; z-index: 90; box-shadow: 0 18px 44px rgba(20,50,24,.28), 0 2px 6px rgba(20,50,24,.12); }
.nest-promo--right { left: auto; right: max(24px, env(safe-area-inset-right)); }
/* Плашка встаёт в строку с крестиком, поэтому заголовок не опускается вниз. */
.nest-promo--card .nest-promo__label { margin: 12px 56px 16px 0; }
.nest-promo--card .nest-promo__title { font-size: 28px; }
.nest-promo--card a.nest-promo__button { width: 100%; }
.nest-promo--top { border-radius: 0; width: 100%; padding: 14px max(76px, env(safe-area-inset-right)) 14px max(24px, env(safe-area-inset-left)); gap: 28px; }
.nest-promo--top::after { inset: auto 0 0; border: 0; border-radius: 0; height: 3px; background: var(--np-gold); }
.nest-promo--top .nest-promo__body { flex: 0 1 auto; margin-left: auto; }
.nest-promo--top .nest-promo__button { margin-right: auto; }
.nest-promo--top .nest-promo__label { display: none; }
.nest-promo--top .nest-promo__title { font-size: 20px; }
.nest-promo--top .nest-promo__description { margin-top: 2px; font-size: 14px; }
.nest-promo--top button.nest-promo__close { top: 50%; margin-top: -24px; }
.nest-promo-inline-source { clear: both; margin: 20px 0; }
.nest-promo--inline { width: 100%; padding: 26px 30px; }
@media (max-width: 767px) {
    .nest-promo--top { flex-direction: column; align-items: stretch; gap: 10px; padding: 14px max(70px, env(safe-area-inset-right)) 16px max(16px, env(safe-area-inset-left)); }
    .nest-promo--top .nest-promo__body, .nest-promo--top .nest-promo__button { margin: 0; }
    .nest-promo--top a.nest-promo__button { align-self: flex-start; min-height: 44px; padding: 9px 16px; font-size: 14px; }
    .nest-promo--top .nest-promo__title { font-size: 17px; }
    .nest-promo--top .nest-promo__description { font-size: 13px; }
    .nest-promo--top button.nest-promo__close { top: 12px; right: 12px; margin-top: 0; }
    .nest-promo--inline { padding: 20px; flex-direction: column; align-items: stretch; gap: 16px; }
    .nest-promo--inline .nest-promo__title { font-size: 22px; }
}
/* Телефон, повёрнутый горизонтально: без сжатия кнопка уходит в прокрутку внутри карточки. */
@media (min-width: 768px) and (max-height: 520px) {
    .nest-promo--card { gap: 12px; padding: 16px 20px 18px; }
    .nest-promo--card .nest-promo__label { margin: 14px 56px 10px 0; }
    .nest-promo--card .nest-promo__title { font-size: 21px; }
    .nest-promo--card .nest-promo__description { margin-top: 4px; font-size: 14px; }
}
@media (prefers-reduced-motion: no-preference) {
    .nest-promo--floating { animation: nest-promo-in .22s ease-out; }
    .nest-promo--floating.nest-promo--card { animation-name: nest-promo-rise; animation-duration: .35s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
    @keyframes nest-promo-in { from { opacity: 0; } to { opacity: 1; } }
    @keyframes nest-promo-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
    .nest-promo a.nest-promo__button, .nest-promo a.nest-promo__button::after, .nest-promo button.nest-promo__close { transition: none; }
}
