/* ==========================================================
   luxKino — страница фильма / сериала
   Работает вместе с lk-home.css (переменные --lk-*, карточки «Похожие»)
   ========================================================== */

:root {
    --lkm-glass: linear-gradient(180deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .05));
    --lkm-glass-line: rgba(255, 255, 255, .15);
    --lkm-pop: cubic-bezier(.34, 1.56, .64, 1);
}

.lkm [hidden], .lkm-modal [hidden] { display: none !important; }

.lkm { padding-top: clamp(12px, 2vw, 24px); }
.lkm .lk-block:first-of-type { margin-top: clamp(30px, 5vw, 56px); }

/* ==========================================================
   HERO
   ========================================================== */
.lkm-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: clamp(520px, calc(100vh - 150px), 680px);
    border-radius: clamp(20px, 3vw, 32px);
    border: 1px solid var(--lk-line);
    background: #050805;
    overflow: hidden;
    isolation: isolate;
}

.lkm-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none !important;
    object-fit: cover;
    object-position: center 22%;
    z-index: -4;
    animation: lkm-zoom 24s ease-in-out infinite alternate;
}
.lkm-bg.is-blur {
    inset: -40px;
    width: calc(100% + 80px);
    height: calc(100% + 80px);
    filter: blur(30px) saturate(1.35) brightness(.6);
}

.lkm-shade {
    position: absolute;
    inset: 0;
    z-index: -3;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, .92) 0%, rgba(0, 0, 0, .62) 42%, rgba(0, 0, 0, .08) 78%),
        linear-gradient(0deg, rgba(0, 0, 0, .96) 0%, rgba(0, 0, 0, .25) 46%, rgba(0, 0, 0, .40) 100%);
}
.lkm-shade::after {
    content: '';
    position: absolute;
    left: -160px; bottom: -200px;
    width: 560px; height: 460px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(143, 232, 44, .22), transparent 70%);
}
.lkm-dim {
    position: absolute;
    inset: 0;
    z-index: -2;
    background: rgba(0, 0, 0, .58);
    opacity: 0;
    transition: opacity .45s ease;
}
.lkm-hero.is-dim .lkm-dim { opacity: 1; }

/* постер справа (когда нет широкого фона) */
.lkm-poster {
    position: absolute;
    right: clamp(26px, 5vw, 76px);
    bottom: clamp(26px, 4vw, 56px);
    width: clamp(170px, 19vw, 260px);
    aspect-ratio: 2 / 3;
    border-radius: 22px;
    overflow: hidden;
    transform: rotate(3deg);
    border: 1px solid var(--lk-line-strong);
    box-shadow: 0 30px 70px -10px rgba(0, 0, 0, .85), 0 0 60px -10px rgba(143, 232, 44, .5);
    transition: opacity .4s ease, transform .5s var(--lk-ease);
    z-index: 1;
}
.lkm-poster img { width: 100%; height: 100%; object-fit: cover; }
.lkm-hero.is-dim .lkm-poster { opacity: 0; transform: rotate(3deg) translateY(20px); pointer-events: none; }

/* ---------- верхняя панель ---------- */
.lkm-top {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: clamp(14px, 2.2vw, 24px);
}
.lkm-tabs {
    display: flex;
    gap: 2px;
    padding: 5px;
    min-width: 0;
    border-radius: 18px;
    background: var(--lkm-glass);
    border: 1px solid var(--lkm-glass-line);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 8px 30px -12px rgba(0, 0, 0, .7);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}
.lkm-tabs::-webkit-scrollbar { display: none; }
.lkm-tab {
    flex: 0 0 auto;
    padding: 10px 18px;
    border-radius: 13px;
    border: 1px solid transparent;
    font-size: 14.5px;
    font-weight: 700;
    color: #b8c4b5;
    white-space: nowrap;
    transition: color .25s, background .25s, border-color .25s, box-shadow .25s;
}
.lkm-tab:hover { color: #fff; background: rgba(255, 255, 255, .09); }
.lkm-tab.is-active {
    color: #fff;
    background: linear-gradient(180deg, rgba(190, 255, 90, .28), rgba(143, 232, 44, .12));
    border-color: rgba(190, 255, 90, .4);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 0 22px -6px rgba(143, 232, 44, .6);
}

.lkm-close {
    flex: 0 0 auto;
    width: 46px; height: 46px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--lkm-glass);
    border: 1px solid var(--lkm-glass-line);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #fff;
    cursor: pointer;
    transition: background .25s, color .25s, border-color .25s, box-shadow .25s;
}
.lkm-close svg { transition: transform .4s var(--lk-ease); }
.lkm-close:hover {
    background: var(--lk-grad);
    color: var(--lk-on-grad);
    border-color: transparent;
    box-shadow: 0 0 26px -4px rgba(143, 232, 44, .8);
}
.lkm-close:hover svg { transform: rotate(90deg); }

/* ---------- тело ---------- */
.lkm-body {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    align-items: flex-end;
    min-height: 0;
    padding: 0 clamp(18px, 3.5vw, 56px) clamp(22px, 3.5vw, 48px);
}
.lkm-panel { width: 100%; min-width: 0; }
.lkm-in { animation: lkm-in .5s var(--lk-ease) both; }

.lkm-about { max-width: 660px; }

.lkm-title {
    margin: 0 0 16px;
    padding-bottom: .08em;
    font-family: var(--lk-font-display);
    font-weight: 800;
    font-size: clamp(26px, 4.6vw, 56px);
    line-height: 1.06;
    letter-spacing: -.02em;
    text-wrap: balance;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* чипы: рейтинг, год, жанры */
.lkm-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.lkm-chip {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--lkm-glass);
    border: 1px solid var(--lkm-glass-line);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 13px;
    font-weight: 700;
    color: #e3efe0;
    white-space: nowrap;
}
.lkm-chip-pro { background: var(--lk-grad); color: var(--lk-on-grad); border-color: transparent; font-weight: 900; letter-spacing: .06em; }
.lkm-chip-free { color: var(--lk-g1); border-color: rgba(190, 255, 90, .4); }

.lkm-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    min-width: 50px;
    padding: 0 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, .55);
    border: 1px solid rgba(255, 255, 255, .14);
    font-size: 15px;
    font-weight: 900;
}
.lkm-score.is-good { color: var(--lk-g1); border-color: rgba(190, 255, 90, .5); box-shadow: 0 0 20px -6px rgba(143, 232, 44, .7); }
.lkm-score.is-mid  { color: #ffc94a; }
.lkm-score.is-bad  { color: #ff6b6b; }

/* описание: всегда не больше 3 строк, остальное — в окне «Подробнее» */
.lkm-desc {
    margin: 0;
    max-width: 620px;
    font-size: clamp(14.5px, 1.5vw, 16.5px);
    line-height: 1.6;
    color: #d3e0cf;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.lkm-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0 0;
    padding: 6px 0;
    border: 0;
    background: none;
    color: var(--lk-g1);
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 800;
    cursor: pointer;
    transition: gap .25s var(--lk-ease), filter .25s;
}
.lkm-more svg { width: 16px; height: 16px; }
.lkm-more:hover { gap: 10px; filter: brightness(1.15); }

/* ---------- кнопки ---------- */
.lkm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.lkm-form { display: contents; }

.lkm-watch {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 56px;
    padding: 0 30px;
    border-radius: 18px;
    background: var(--lk-grad);
    color: var(--lk-on-grad);
    font-size: 16px;
    font-weight: 800;
    text-decoration: none;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(190, 255, 90, .35), 0 14px 40px -10px rgba(120, 230, 40, .6);
    transition: box-shadow .3s, filter .3s;
}
.lkm-watch::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%);
    transform: translateX(-120%);
    animation: lkm-shine 3.8s ease-in-out infinite;
}
.lkm-watch:hover { filter: brightness(1.07) saturate(1.1); box-shadow: 0 0 0 1px rgba(190, 255, 90, .7), 0 0 36px -2px rgba(143, 232, 44, .8); }
.lkm-watch:active { filter: brightness(1.15); }

.lkm-pill, .lkm-round {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    border-radius: 18px;
    background: var(--lkm-glass);
    border: 1px solid var(--lkm-glass-line);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #fff;
    font-family: inherit;
    font-size: 15.5px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background .25s, border-color .25s, box-shadow .25s, color .25s;
}
.lkm-pill { padding: 0 24px; }
.lkm-round { width: 56px; padding: 0; }
.lkm-pill:hover, .lkm-round:hover {
    border-color: rgba(190, 255, 90, .55);
    background: linear-gradient(180deg, rgba(190, 255, 90, .20), rgba(143, 232, 44, .08));
    box-shadow: 0 0 26px -6px rgba(143, 232, 44, .6);
}
.lkm-pill:active, .lkm-round:active { filter: brightness(1.2); }
.lkm-pill.is-disabled { opacity: .55; cursor: default; pointer-events: none; }

/* избранное: размер не меняется, переключается только заливка */
.lkm-fav svg { width: 22px; height: 22px; fill: none; transition: fill .25s; }
.lkm-fav.is-on {
    background: var(--lk-grad);
    border-color: transparent;
    color: var(--lk-on-grad);
    box-shadow: 0 0 0 1px rgba(190, 255, 90, .4), 0 10px 30px -8px rgba(120, 230, 40, .65);
}
.lkm-fav.is-on svg { fill: currentColor; }
.lkm-fav.is-pop svg { animation: lkm-pop .5s var(--lkm-pop); }
.lkm-fav.is-busy { pointer-events: none; opacity: .8; }

/* ==========================================================
   СЕЗОНЫ И СЕРИИ
   ========================================================== */
.lkm-ph {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.lkm-ph h2 {
    margin: 0;
    font-family: var(--lk-font-display);
    font-weight: 800;
    font-size: clamp(20px, 2.6vw, 28px);
    letter-spacing: -.02em;
}
.lkm-ph-sub { font-size: 14px; font-weight: 600; color: var(--lk-mute); }

.lkm-seasons {
    display: flex;
    gap: 8px;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    padding: 2px;
}
.lkm-seasons::-webkit-scrollbar { display: none; }
.lkm-season-btn {
    flex: 0 0 auto;
    height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--lkm-glass);
    border: 1px solid var(--lkm-glass-line);
    color: #cfdccb;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .25s, color .25s, border-color .25s, box-shadow .25s;
}
.lkm-season-btn:hover { color: #fff; border-color: rgba(190, 255, 90, .45); }
.lkm-season-btn.is-active { background: var(--lk-grad); color: var(--lk-on-grad); border-color: transparent; box-shadow: 0 0 22px -6px rgba(143, 232, 44, .8); }

.lkm-car-wrap { position: relative; }
.lkm-car {
    display: flex;
    gap: 14px;
    padding: 4px 2px 10px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}
.lkm-car::-webkit-scrollbar { display: none; }

.lkm-ep {
    flex: 0 0 clamp(188px, 21vw, 248px);
    height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
    border-radius: 22px;
    background: var(--lkm-glass);
    border: 1px solid var(--lkm-glass-line);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #fff;
    text-decoration: none;
    scroll-snap-align: start;
    transition: border-color .3s, background .3s, box-shadow .3s;
}
.lkm-ep-top { display: flex; align-items: center; justify-content: space-between; }
.lkm-ep-num {
    font-family: var(--lk-font-display);
    font-weight: 900;
    font-size: 36px;
    line-height: 1;
    background: linear-gradient(180deg, #fff 0%, #c9ccd0 50%, #70757c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.lkm-ep-go {
    width: 40px; height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    transition: background .3s, color .3s;
}
.lkm-ep-go svg { width: 18px; height: 18px; }
.lkm-ep-text { display: block; min-width: 0; }
.lkm-ep-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    min-height: 2.5em;
}
.lkm-ep-sub { display: block; margin-top: 4px; font-size: 12.5px; color: var(--lk-mute); }
a.lkm-ep:hover {
    border-color: rgba(190, 255, 90, .55);
    background: linear-gradient(180deg, rgba(190, 255, 90, .18), rgba(143, 232, 44, .06));
    box-shadow: 0 0 30px -8px rgba(143, 232, 44, .6);
}
a.lkm-ep:hover .lkm-ep-go { background: var(--lk-grad); color: var(--lk-on-grad); }
.lkm-ep.is-locked { opacity: .6; cursor: not-allowed; }

.lkm-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 46px; height: 46px;
    margin-top: -28px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--lk-line-strong);
    background: rgba(5, 7, 5, .75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--lk-g1);
    cursor: pointer;
    transition: background .25s, color .25s, opacity .25s;
}
.lkm-arrow:hover { background: var(--lk-grad); color: var(--lk-on-grad); }
.lkm-arrow-prev { left: 4px; }
.lkm-arrow-next { right: 4px; }
.lkm-arrow[disabled] { opacity: 0; pointer-events: none; }
@media (hover: hover) and (min-width: 821px) { .lkm-car-wrap.has-overflow .lkm-arrow { display: flex; } }

/* ==========================================================
   ДЕТАЛИ
   ========================================================== */
.lkm-dgrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    max-width: 900px;
    margin: 0;
}
.lkm-dgrid > div {
    min-width: 0;
    padding: 16px 18px;
    border-radius: 18px;
    background: var(--lkm-glass);
    border: 1px solid var(--lkm-glass-line);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.lkm-dgrid dt { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--lk-mute); }
.lkm-dgrid dd { margin: 8px 0 0; font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }

/* ==========================================================
   БАННЕР «ТОЛЬКО ПО ПОДПИСКЕ»
   ========================================================== */
.lkm-lock {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 20px;
    padding: 20px 24px;
    border-radius: 24px;
    border: 1px solid var(--lk-line-strong);
    background:
        radial-gradient(420px 160px at 0% 50%, rgba(143, 232, 44, .16), transparent 70%),
        linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
}
.lkm-lock-ico {
    flex: 0 0 auto;
    width: 54px; height: 54px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--lk-grad);
    color: var(--lk-on-grad);
}
.lkm-lock h3 { margin: 0 0 4px; font-size: 17px; font-weight: 800; }
.lkm-lock p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--lk-mute); }
.lkm-lock > div:nth-child(2) { flex: 1; min-width: 0; }

/* ==========================================================
   ОКНА (трейлер и «Подробнее»)
   ========================================================== */
.lkm-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .74);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s;
}
.lkm-modal.open { opacity: 1; visibility: visible; }

.lkm-modal-box {
    width: 100%;
    max-width: 960px;
    border-radius: 26px;
    background: linear-gradient(160deg, #121a12 0%, #070a07 100%);
    border: 1px solid var(--lk-line-strong);
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .95), 0 0 80px -30px rgba(143, 232, 44, .45);
    overflow: hidden;
    transform: translateY(16px) scale(.97);
    transition: transform .4s var(--lk-ease);
}
.lkm-modal.open .lkm-modal-box { transform: none; }

.lkm-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 14px 14px 22px;
    border-bottom: 1px solid var(--lk-line);
}
.lkm-modal-head strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 800;
}
.lkm-modal-close {
    flex: 0 0 auto;
    width: 40px; height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--lkm-glass-line);
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
    color: #fff;
    cursor: pointer;
    transition: background .25s, color .25s;
}
.lkm-modal-close:hover { background: var(--lk-grad); color: var(--lk-on-grad); border-color: transparent; }

.lkm-video { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.lkm-video iframe, .lkm-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }

/* окно «Подробнее» */
.lkm-sheet { max-width: 640px; display: flex; flex-direction: column; max-height: min(80vh, 760px); }
.lkm-sheet-body { padding: 20px 22px 26px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.lkm-sheet-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.lkm-sheet-text { margin: 0; font-size: 16px; line-height: 1.7; color: #dbe7d7; white-space: pre-line; overflow-wrap: anywhere; }
.lkm-sheet-grab { display: none; width: 44px; height: 5px; margin: 10px auto 0; border-radius: 3px; background: rgba(255, 255, 255, .22); }

/* уведомление */
.lkm-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 300;
    max-width: calc(100vw - 32px);
    padding: 13px 20px;
    border-radius: 14px;
    background: rgba(10, 14, 10, .92);
    border: 1px solid var(--lk-line-strong);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .8), 0 0 30px -10px rgba(143, 232, 44, .5);
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 16px);
    transition: opacity .3s ease, transform .35s var(--lk-ease);
}
.lkm-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================
   АНИМАЦИИ
   ========================================================== */
@keyframes lkm-in    { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes lkm-zoom  { from { transform: scale(1.02); } to { transform: scale(1.09); } }
@keyframes lkm-shine { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@keyframes lkm-pop   { 0% { transform: scale(.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* ==========================================================
   ТЕЛЕФОН / ПЛАНШЕТ
   ========================================================== */
@media (max-width: 820px) {
    .lkm-hero { min-height: clamp(540px, calc(100svh - 200px), 740px); }
    .lkm-poster { display: none; }
    .lkm-shade {
        background:
            linear-gradient(0deg, rgba(0, 0, 0, .97) 0%, rgba(0, 0, 0, .80) 36%, rgba(0, 0, 0, .12) 74%, rgba(0, 0, 0, .50) 100%);
    }
    .lkm-bg { object-position: center 18%; }
    .lkm-about { max-width: none; }
    .lkm-title { font-size: clamp(26px, 8vw, 38px); margin-bottom: 14px; }

    .lkm-actions { gap: 10px; }
    .lkm-watch { flex: 1 1 100%; height: 56px; }
    .lkm-pill { flex: 1 1 0; min-width: 0; padding: 0 12px; height: 52px; }
    .lkm-round { flex: 0 0 52px; width: 52px; height: 52px; }

    .lkm-ep { flex-basis: 188px; height: 150px; }
    .lkm-dgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .lkm-lock { flex-direction: column; align-items: flex-start; padding: 18px; }
    .lkm-lock .lkm-pill { width: 100%; flex: none; }

    .lkm-toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
}

@media (max-width: 640px) {
    /* окна на телефоне — снизу, как «шторка» */
    .lkm-modal { padding: 12px; }
    .lkm-modal--sheet { align-items: flex-end; padding: 0; }
    .lkm-sheet {
        max-width: none;
        max-height: 86vh;
        max-height: 86dvh;
        border-radius: 26px 26px 0 0;
        transform: translateY(100%);
        transition: transform .45s var(--lk-ease);
        padding-bottom: env(safe-area-inset-bottom);
    }
    .lkm-modal.open .lkm-sheet { transform: none; }
    .lkm-sheet-grab { display: block; }
    .lkm-modal-box:not(.lkm-sheet) { border-radius: 20px; }
}

@media (max-width: 420px) {
    .lkm-tab { padding: 9px 14px; font-size: 13.5px; }
    .lkm-chip { height: 32px; padding: 0 12px; font-size: 12.5px; }
    .lkm-pill { font-size: 14.5px; }
}

/* на тач-экранах без «залипающих» подсветок */
@media (hover: none) {
    .lkm-pill:hover, .lkm-round:hover { background: var(--lkm-glass); border-color: var(--lkm-glass-line); box-shadow: none; }
    .lkm-fav.is-on:hover { background: var(--lk-grad); border-color: transparent; box-shadow: 0 0 0 1px rgba(190, 255, 90, .4), 0 10px 30px -8px rgba(120, 230, 40, .65); }
    a.lkm-ep:hover { background: var(--lkm-glass); border-color: var(--lkm-glass-line); box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
    .lkm *, .lkm-modal, .lkm-modal *, .lkm-toast { animation: none !important; transition-duration: .01ms !important; }
}