/* ---------- Материалы (01.11): подарки в кабинете — коробка, сцена открытия, карточка, лица материалов, плеер,
   а также кнопка в шапке, тизер, полка и список (их разметку рисует lk.js). Движок — lk-gifts.js (window.LKGifts).
   Правила (спецификация «Материалы», §9):
   • двигаются только transform и opacity; анимации церемонии — WAAPI из движка, здесь только покой (он же
     конечное состояние каждой анимации) и короткие CSS-анимации: покачивание коробки, значок, кольцо;
   • никакого статического will-change, никаких filter/backdrop-filter, тени и размеры не анимируются;
   • текст 18px; 16px — только цифры значка, «Новое» и счётчики .lk-count; A+ масштабирует сцену через --gk;
   • «✦» (.lk.is-quiet) и prefers-reduced-motion гасят всё движение (движок сам проверяет их при открытии). */

/* ---------- палитры подарков: цвет — только направление, форма одна для всех (§4.1) ---------- */
.gbox, [data-g] { --wrap: #F15A6A; --wrap-d: #C9364F; --wrap-l: #F8897F; --rib: #FFFFFF; --rib-d: #F2D2C8; --dir-t: #FFE9E4; }   /* 'all' и лично: коралл */
[data-g="painting"]  { --wrap: #C75B39; --wrap-d: #8E3D24; --wrap-l: #DB7A57; --rib: #FFF1E2; --rib-d: #E8CBAE; --dir-t: var(--c-paint-t); }
[data-g="art"]       { --wrap: #34538C; --wrap-d: #243B66; --wrap-l: #4D6FAD; --rib: #F2C65A; --rib-d: #C99A2E; --dir-t: var(--c-art-t); }
[data-g="hpt"]       { --wrap: #6B8E4E; --wrap-d: #4C6837; --wrap-l: #86A866; --rib: #FFF1E2; --rib-d: #E0D2B6; --dir-t: var(--c-craft-t); }
[data-g="kulinaria"] { --wrap: #E0A02F; --wrap-d: #A9741A; --wrap-l: #F0BC57; --rib: #C75B39; --rib-d: #8E3D24; --dir-t: var(--c-food-t); }
[data-g="style"]     { --wrap: #B5547E; --wrap-d: #823A59; --wrap-l: #CC7499; --rib: #F2C65A; --rib-d: #C99A2E; --dir-t: var(--c-style-t); }
[data-g="activity"]  { --wrap: #2E8B8B; --wrap-d: #1F6363; --wrap-l: #45A5A2; --rib: #F8A58A; --rib-d: #D9775C; --dir-t: var(--c-active-t); }

/* общие узоры и значки (svg.u-defs в lk.html): нельзя display:none — пропадут url(#…) */
.u-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.lkg-ico { width: 1em; height: 1em; flex: none; fill: currentColor; vertical-align: -.125em; }

/* ---------- коробка: сетка рисунка 200×220, каждая часть — свой тесный слой (§4.4) ---------- */
.gbox { position: relative; display: block; width: var(--gw, 128px); aspect-ratio: 200 / 220; }
.gbox__in { position: absolute; inset: 0; transform-origin: 50% 90%; }
.gbox__in > *, .gbow > * { position: absolute; display: block; }
.gbox svg { display: block; overflow: visible; }
.gbox__back, .gbox__front, .gbox__band, .gbox__lid > svg { width: 100%; height: 100%; }
.gbox__lid > svg { position: absolute; inset: 0; }
.gbox__glow { position: absolute; left: -35%; top: -33.3%; width: 170%; height: 154.5%; opacity: 0; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255,236,196,.95), rgba(255,214,170,.55) 38%, rgba(255,214,170,0) 72%); }
.gbox__shadow { left: 10%; top: 86.5%; width: 80%; height: 8.5%; background: radial-gradient(closest-side, rgba(34,32,43,.26), rgba(34,32,43,0)); }
.gbox__back { left: 14%; top: 40.909%; width: 72%; height: 6.364%; }
.gbox__beam { left: 22%; top: -24%; width: 56%; height: 68%; opacity: 0; transform-origin: 50% 100%; pointer-events: none;
  clip-path: polygon(34% 100%, 66% 100%, 100% 0, 0 0); background: linear-gradient(to top, rgba(255,246,222,.95), rgba(255,246,222,0) 92%); }
.gbox__card { top: 48.18%; left: calc(50% - var(--mw, 38%) / 2); width: var(--mw, 38%); height: var(--mh, 29%); }   /* --mw/--mh — движок, в t=0 */
.gbox__card-in { position: absolute; inset: 0; overflow: hidden; background: #fff; box-shadow: 0 6px 16px rgba(34,32,43,.18); }   /* радиус — движок: 18px×k0 */
.gbox__card-in > .lk-gface { position: absolute; left: 0; top: 0; margin: 0; transform-origin: 0 0; }   /* уменьшенная копия лица материала */
.gbox__shine { position: absolute; top: -10%; bottom: -10%; left: 0; width: 45%; transform: translateX(-130%) skewX(-18deg); pointer-events: none;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.85), rgba(255,255,255,0)); }
.gbox__front { left: 14%; top: 40.909%; width: 72%; height: 48.182%; }
.gbox__band { left: 38.5%; top: 43.455%; width: 42.3%; height: 45.636%; transform-origin: 50% 100%; }
.gbox__seam { left: 15%; top: 45%; width: 70%; height: 3%; border-radius: 50%; opacity: 0;
  background: radial-gradient(closest-side, #FFF8DF, rgba(255,226,154,.9) 55%, rgba(255,226,154,0)); }   /* щель света под крышкой */
.gbox__lid { left: 11%; top: 31.364%; width: 79%; height: 18.636%; transform-origin: 50% 60%; }
.gbow { inset: 0; pointer-events: none; }
.gbow__half { top: 15.455%; width: 29%; height: 35.455%; }
.gbow__half--l { left: 24%; transform-origin: 91.4% 50%; }   /* ось — узел (101,73) */
.gbow__half--r { left: 48%; transform-origin: 8.6% 50%; }
.gbow__knot { left: 45%; top: 28.64%; width: 11%; height: 9.09%; }
.gbox__spark { position: absolute; width: 9%; aspect-ratio: 1; opacity: 0; pointer-events: none; background: #F2C65A;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); }
.gbox__spark--1 { left: 18%; top: 14%; } .gbox__spark--2 { left: 76%; top: 20%; width: 7%; } .gbox__spark--3 { left: 84%; top: 52%; width: 6%; }

/* покачивание: только CSS, конечное (3 раза), одна коробка на экран; класс ставит lk.js при первом показе (§4.6) */
@keyframes gbox-wiggle { 0%, 13%, 100% { transform: none; } 2.4% { transform: translateY(-4%) rotate(-5deg); }
  4.8% { transform: translateY(-4%) rotate(4deg); } 7.2% { transform: translateY(-2%) rotate(-2.5deg); } 9.6% { transform: rotate(1.2deg); } }
@keyframes gbox-twinkle { 0%, 8%, 30%, 100% { opacity: 0; transform: scale(.3); } 14% { opacity: 1; transform: scale(1) rotate(45deg); } 22% { opacity: 0; transform: scale(.5) rotate(90deg); } }
.gbox.is-wiggle .gbox__in { animation: gbox-wiggle 6s var(--lk-ease, cubic-bezier(.22,1,.36,1)) 1.2s 3; }
.gbox.is-wiggle .gbox__spark { animation: gbox-twinkle 6s ease-out 3; }
.gbox.is-wiggle .gbox__spark--1 { animation-delay: 1.3s; } .gbox.is-wiggle .gbox__spark--2 { animation-delay: 1.5s; } .gbox.is-wiggle .gbox__spark--3 { animation-delay: 1.7s; }

/* ---------- кнопка «Материалы» в шапке кабинета (§2.1) ---------- */
.lk-giftbtn { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px 0 12px;
  border-radius: 999px; border: 1.5px solid var(--lk-line, #E7E0D4); background: #fff; color: var(--ink); font-size: 18px; font-weight: 700; text-decoration: none; }
.lk-giftbtn__ico { width: 30px; height: 30px; flex: none; }
.lk-giftbtn.has-new { background: #FFEAF0; border-color: #F7B9C9; }
.lk-giftbtn__badge { position: absolute; top: -8px; right: -8px; min-width: 28px; height: 28px; padding: 0 7px; border-radius: 999px;
  background: #D02462; color: #fff; border: 2px solid #fff; font-size: 16px; font-weight: 800; line-height: 24px; text-align: center; }
.lk-giftbtn__badge.is-in { animation: lk-badge-in .38s var(--lk-ease) both; }
.lk-giftbtn__badge.is-bump { animation: lk-badge-bump .25s var(--lk-ease); }
@keyframes lk-badge-in { from { opacity: 0; transform: scale(.4); } }
@keyframes lk-badge-bump { from { transform: scale(1.25); } }
.lk-giftbtn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* кнопка ритуала «открыть»: коралловый градиент, белый текст 5,1:1 и 4,6:1 (§2.2, решение 9) */
.btn.lk-gbtn--gift { background: linear-gradient(118deg, #D02462, #C4503F); color: #fff; border: 0; box-shadow: 0 10px 24px rgba(208,36,98,.28); }
.btn.lk-gbtn--gift:hover { background: linear-gradient(118deg, #BC1F58, #B04535); color: #fff; }
.lk-gstage .btn:focus-visible, .lk-gteaser .btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* ---------- тизер на главном экране (§2.2) ---------- */
.lk-gteaser { display: grid; grid-template-columns: auto 1fr auto; gap: 10px 18px; align-items: center; padding: 14px 22px 14px 12px;
  border-radius: var(--lk-r); border: 1.5px solid #F8CBD3;
  background: radial-gradient(40% 90% at 9% 55%, rgba(255,255,255,.9), rgba(255,255,255,0) 70%),
             linear-gradient(118deg, #FFE0E9 0%, #FFE4DE 40%, #FFEEE2 75%, #FFF4E8 100%); }
.lk-gteaser__pile { position: relative; width: 112px; height: 104px; cursor: pointer; }
.lk-gteaser__pile .gbox { position: absolute; }
.lk-gteaser__pile .gbox:nth-child(1) { --gw: 96px; left: 8px; bottom: 0; z-index: 3; }
.lk-gteaser__pile .gbox:nth-child(2) { --gw: 68px; left: -6px; bottom: 34px; transform: rotate(-9deg); z-index: 1; }
.lk-gteaser__pile .gbox:nth-child(3) { --gw: 60px; right: -8px; bottom: 38px; transform: rotate(8deg); z-index: 2; }
.lk-gteaser h2 { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.2; }
.lk-gteaser__from { margin: 2px 0 0; font-size: 18px; font-weight: 700; }
.lk-gteaser__txt p:last-child { margin: 2px 0 0; font-size: 18px; color: var(--ink-soft); }
.lk-gteaser__acts { display: grid; gap: 6px; justify-items: center; }
.lk-gteaser__acts .lk-linkbtn { font-size: 18px; }
@media (max-width: 600px) {
  .lk-gteaser { grid-template-columns: 104px 1fr; padding: 12px 16px 16px 10px; }
  .lk-gteaser__acts { grid-column: 1 / -1; justify-items: stretch; text-align: center; }
  .lk-gteaser__acts .btn { justify-content: center; }
}

/* ---------- экран «Материалы»: полка подарков и «Мои материалы» (§3) ---------- */
.lk-matscr__lead { font-size: 18px; color: var(--ink-soft); max-width: 62ch; margin: 0 0 24px; }
.lk-gshelf__hint { margin: -4px 0 14px; font-size: 18px; color: var(--muted); }
.lk-gshelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.lk-gshelf__bulk { display: grid; gap: 8px; justify-items: start; margin-top: 16px; }
.lk-gshelf__bulk p { margin: 0; font-size: 18px; color: var(--muted); }
.lk-matscr__none { margin: 0 0 16px; font-size: 18px; color: var(--ink-soft); }
.lk-mats__more { margin: 16px 0 0; text-align: center; }
.lk-matscr__empty h3 { font-size: 22px; }
.lk-matscr__empty p { font-size: 18px; }
/* экран целиком (интеграция, 01.11): разделы не слипаются; кнопки и фильтры — 18px, как весь текст «Материалов» */
.lk-matscr .lk-matscr__sec { margin-bottom: 40px; }
.lk-matscr .lk-skel { margin-bottom: 24px; }
.lk-matscr .btn { font-size: 18px; }
.lk-matscr .lk-gal__filters button { min-height: 48px; font-size: 18px; }
#lk-mat-title:focus, #lk-mats-h:focus { outline: none; }   /* фокус ставит скрипт: начало экрана и списка для чтеца, рамка не нужна */

/* плитка подарка: одна кнопка на подарок, без вложенных кнопок (§3.1) */
.lk-gift { position: relative; display: grid; justify-items: center; align-content: start; gap: 4px; text-align: center; padding: 14px 14px 16px;
  border-radius: var(--lk-r); border: 1.5px solid var(--lk-line); color: var(--ink); font: inherit; cursor: pointer;
  background: radial-gradient(70% 55% at 50% 38%, var(--dir-t), rgba(255,255,255,0) 72%), #fff;
  transition: transform .25s var(--lk-ease), box-shadow .25s var(--lk-ease); }
.lk-gift .gbox { --gw: 132px; margin: calc(var(--gw) * -.14) 0 calc(var(--gw) * -.05); transition: transform .25s var(--lk-ease); }
.lk-gift__txt { display: grid; gap: 2px; }
.lk-gift__from { font-size: 18px; font-weight: 800; }
.lk-gift__aud, .lk-gift__in { font-size: 18px; color: var(--ink-soft); }
.lk-gift__date { font-size: 18px; color: var(--muted); }
.lk-gift__chip { justify-self: center; padding: 2px 12px; border-radius: 999px; background: #FFE3EA; font-size: 18px; font-weight: 700; }
.lk-gift__cta { margin-top: 10px; width: 100%; min-height: 56px; display: grid; place-items: center; border-radius: 999px;
  background: linear-gradient(118deg, #D02462, #C4503F); color: #fff; font-size: 18px; font-weight: 700; }
@media (hover: hover) and (pointer: fine) {
  .lk-gift:hover { transform: translateY(-3px); box-shadow: var(--lk-shadow); }
  .lk-gift:hover .gbox { transform: translateY(-4px) rotate(-2deg); }
}
.lk-gift:active .gbox { transform: scale(.96); }
.lk-gift:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
/* backwards, а не both: после появления анимация не держит transform — иначе подъём плитки при наведении не работает */
.lk-gift.is-enter { animation: lk-in .45s var(--lk-ease) backwards; animation-delay: calc(var(--j, 0) * 60ms); }
/* в ряду плиток (шире 560 px) «Открыть подарок» на одной линии: лишняя высота — тексту, он прижат кверху */
@media (min-width: 561px) { .lk-gift { grid-template-rows: auto 1fr auto; } .lk-gift__txt { align-content: start; } }
/* «И ещё 3 подарка»: три неподвижные коробки и «Показать все» */
.lk-gift--more .lk-gift__stack { position: relative; width: 140px; height: 118px; }
.lk-gift--more .lk-gift__stack .gbox { position: absolute; --gw: 76px; margin: 0; }
.lk-gift--more .lk-gift__stack .gbox:nth-child(1) { left: 0; bottom: 4px; transform: rotate(-8deg); }
.lk-gift--more .lk-gift__stack .gbox:nth-child(2) { right: 0; bottom: 6px; transform: rotate(7deg); }
.lk-gift--more .lk-gift__stack .gbox:nth-child(3) { left: 32px; bottom: 26px; z-index: 1; }
.lk-gift--more .lk-gift__cta { background: #fff; color: var(--ink); border: 1.6px solid var(--ink); }
.lk.is-quiet .lk-gift, .lk.is-quiet .lk-gift .gbox { transform: none !important; transition: none; }
.lk.is-quiet .lk-gift.is-enter { animation: none; }
@media (max-width: 560px) {
  .lk-gshelf { grid-template-columns: 1fr; }
  .lk-gift { grid-template-columns: 104px 1fr; column-gap: 14px; align-items: center; justify-items: start; text-align: left; }
  .lk-gift .gbox { --gw: 104px; }
  .lk-gift__chip { justify-self: start; }
  .lk-gift__cta { grid-column: 1 / -1; }
  .lk-gift--more .lk-gift__stack { width: 104px; height: 96px; }
  .lk-gift--more .lk-gift__stack .gbox { --gw: 58px; }
  .lk-gift--more .lk-gift__stack .gbox:nth-child(3) { left: 24px; bottom: 22px; }
}

/* строка «Мои материалы» (§3.2): уголок с лентой у превью — память о том, что это был подарок */
.lk-mats { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 900px) { .lk-mats { grid-template-columns: 1fr 1fr; } }
.lk-mat { position: relative; display: grid; grid-template-columns: 76px 1fr; grid-template-rows: 1fr auto; align-items: start; gap: 8px 14px; padding: 14px 16px 16px;
  background: #fff; border: 1.5px solid var(--lk-line); border-radius: var(--lk-r); }   /* в две колонки строки равной высоты: лишнее место — тексту, кнопки внизу */
.lk-mat__thumb { position: relative; width: 76px; height: 76px; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: var(--dir-t); cursor: pointer;
  display: grid; place-items: center; color: var(--wrap-d); }
.lk-mat__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lk-mat__thumb .lk-mat__page { object-position: top; }
.lk-mat__thumb::after { content: ""; position: absolute; top: 12px; right: -20px; width: 70px; height: 10px; transform: rotate(45deg);
  background: var(--rib); box-shadow: inset 0 0 0 1px var(--rib-d); }
.lk-mat__thumb:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.lk-mat__art { position: absolute; inset: 0; background: linear-gradient(135deg, var(--wrap-l), var(--wrap) 55%, var(--wrap-d)); }
.lk-mat__disc { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 3px 10px rgba(0,0,0,.25); display: grid; place-items: center; }
.lk-mat__disc::before { content: ""; margin-left: 3px; border-left: 10px solid var(--wrap-d); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.lk-mat__ico { width: 34px; height: 34px; }
.lk-mat__sheet { display: grid; place-items: center; width: 46px; height: 58px; border-radius: 5px; background: #fff; box-shadow: 0 4px 10px rgba(34,32,43,.14); transform: rotate(-4deg); }
.lk-mat__sheet b { font-size: 13px; font-weight: 800; color: var(--wrap-d); letter-spacing: .02em; }
.lk-mat__h { margin: 0; }
.lk-mat__title { all: unset; cursor: pointer; font-size: 18px; font-weight: 700; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lk-mat__title:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.lk-mat__meta { margin: 2px 0 0; font-size: 18px; color: var(--muted); }
.lk-mat__new { display: inline-block; margin-right: 6px; padding: 0 8px; border-radius: 999px; background: #FFE3EA; color: var(--ink); font-size: 16px; font-weight: 800; }
.lk-mat__note { margin: 4px 0 0; font-size: 18px; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.lk-mat__body .lk-linkbtn { font-size: 18px; }
.lk-mat__acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.lk-mat__acts .btn { min-height: 48px; font-size: 18px; }
.lk-mat__prog { position: absolute; left: 16px; right: 16px; bottom: 6px; height: 4px; border-radius: 2px; background: var(--wrap-d); transform-origin: 0 50%; transform: scaleX(0); }
.lk-mat.is-fresh::after, .lk-mat.is-target::after, .lk-gift.is-target::after { content: ""; position: absolute; inset: -1.5px; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 3px #F7B9C9; opacity: 0; animation: lk-mat-ring 3.2s var(--lk-ease) 1 both; }
@keyframes lk-mat-ring { 0%, 60% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- сцена открытия (§5.1–5.2): прямой ребёнок main#lk, вне .container ---------- */
.lk-gstage { position: fixed; inset: 0; z-index: 92; color: var(--ink); }   /* выше .lk-panel (90), ниже .lk-toast (95) и .lightbox (120) */
.lk-gstage[hidden] { display: none; }
.lk-gstage:focus { outline: none; }
.lk-gstage__bg { position: absolute; inset: 0; background: radial-gradient(110% 70% at 50% 38%, #FFF6EE 0%, #FFFFFF 58%, #FFF7F2 100%); }   /* непрозрачный, без размытия */
.lk-gstage__warm { position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(130% 95% at 50% 42%, rgba(255,255,255,0) 35%, rgba(251,208,168,.45) 75%, rgba(245,137,107,.32) 100%); }
.lk-gstage__play { position: absolute; inset: 0; overflow: hidden; pointer-events: none; display: grid; place-content: center; justify-items: center;
  gap: 12px; padding: calc(72px + env(safe-area-inset-top)) 16px 9vh; --gw: min(62vw, 260px, 36vh); }
.lk-gstage__play[hidden] { display: none; }
.lk-gstage__from { margin: 0; text-align: center; font-size: calc(22px * var(--gk, 1)); font-weight: 800; line-height: 1.25; text-wrap: balance; }
.lk-gstage__from small { display: block; margin-top: 4px; font-size: calc(18px * var(--gk, 1)); font-weight: 600; color: var(--ink-soft); }
.lk-gstage__skip { position: absolute; left: 16px; right: 16px; bottom: calc(24px + env(safe-area-inset-bottom)); margin: 0; text-align: center; font-size: 18px; color: var(--ink-soft); opacity: 0; }
.lk-gstage__scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column;
  padding: calc(76px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom));
  isolation: isolate; }   /* z-index лица и бумаги остаются внутри: конфетти и верхняя полоса всегда поверх карточки */
.lk-gstage__col { margin: auto 0; align-self: center; width: min(560px, 100%); display: grid; gap: 16px; }   /* auto-поля = безопасное центрирование */
.lk-gstage.is-playing .lk-gstage__scroll, .lk-gstage.is-guard .lk-gstage__scroll { pointer-events: none; }
.lk-gstage__fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.lk-gstage .u-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* голосовая строка; на страницах без lk.css тоже */
.lk-gstage__top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 12px 0 16px; pointer-events: none; }
.lk-gstage__top > * { pointer-events: auto; }
.lk-gstage__count { padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.92); font-size: 18px; font-weight: 700; color: var(--ink-soft); }
.lk-gstage__x { margin-left: auto; min-height: 48px; padding: 0 18px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line);
  color: var(--ink); font: 700 18px/1 var(--font-body); cursor: pointer; box-shadow: 0 4px 14px rgba(34,32,43,.08); }
.lk-gstage__x:hover { border-color: var(--ink); }
.lk-gstage__x:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.lk-gstage__foot { display: grid; gap: 10px; justify-items: stretch; text-align: center; }
.lk-gstage__foot p { margin: 0; font-size: calc(18px * var(--gk, 1)); color: var(--muted); }
.lk-gstage__foot .btn, .lk-gcard__acts .btn { justify-content: center; text-align: center; white-space: normal; line-height: 1.2; }
.lk-gstage .lk-big { min-height: 56px; font-size: calc(18px * var(--gk, 1)); padding-inline: 22px; }
.lk-gstage.is-calm .lk-gstage__play { display: none; }
.lk.is-zoom .lk-gstage { --gk: 1.15; }
.lk.is-zoom .lk-gstage__col { width: min(600px, 100%); }
body.lk-gift-on .mascot, body.lk-gift-on .mascot-chat, body.lk-gift-on .readbar { visibility: hidden !important; }   /* Искорка и полоса чтения — z 95, выше сцены */

/* ---------- открытый подарок: картинка сверху, письмо снизу (§6.1) ---------- */
.lk-gcard { position: relative; display: grid; }
.lk-gface { position: relative; overflow: hidden; border: 6px solid #fff; border-radius: 18px; background: var(--dir-t); box-shadow: 0 18px 40px rgba(34,32,43,.18); }
.lk-gcard__face { z-index: 2; justify-self: center; width: calc(100% - 20px); }   /* = margin 0 10px; max-width — движок, если лицо выше полэкрана */
.lk-gcard__body { position: relative; z-index: 1; margin-top: -22px; padding: 38px 20px 20px; display: grid; gap: 14px; border-radius: 22px; background: #fff;
  box-shadow: 0 24px 60px rgba(34,32,43,.12), 0 0 0 1.5px rgba(34,32,43,.05); font-size: calc(18px * var(--gk, 1)); line-height: 1.45; }
.lk-gcard__chip { justify-self: start; display: inline-flex; align-items: center; gap: 8px; margin: 0; min-height: 36px; padding: 4px 14px; border-radius: 999px;
  background: var(--dir-t); font-weight: 700; }
.lk-gcard__dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--wrap); }
.lk-gcard h2 { margin: 0; font-size: calc(26px * var(--gk, 1)); font-weight: 800; line-height: 1.15; letter-spacing: -.01em; text-wrap: balance; overflow-wrap: anywhere; }
.lk-gcard h2:focus { outline: none; }
.lk-gcard__note { padding: 16px 18px; border-radius: 16px; background: #FFF6EA; line-height: 1.6; }
.lk-gcard__hi { margin: 0 0 4px; font-weight: 800; }
.lk-gcard__txt { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.lk-gcard__sign { display: flex; align-items: center; gap: 12px; margin: 12px 0 0; color: var(--ink-soft); line-height: 1.35; }
.lk-gcard__body > .lk-gcard__sign { margin: 0; }
.lk-gcard__ava { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--wrap-d); color: #fff; font-weight: 800; display: grid; place-items: center; }
.lk-gcard__acts { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.lk-gcard__acts .btn { min-height: 56px; font-size: calc(18px * var(--gk, 1)); }
.lk-gcard__hint { margin: 0; color: var(--muted); }
@media (max-width: 480px) {
  .lk-gcard__acts { grid-template-columns: 1fr; }
  .lk-gcard h2 { font-size: calc(24px * var(--gk, 1)); }
}

/* ---------- лица материалов: общий элемент, он же образец мини-копии в коробке (§6.2) ---------- */
.lk-gface__pill { position: absolute; left: 10px; top: 10px; z-index: 1; display: inline-flex; align-items: center; gap: 6px; max-width: calc(100% - 20px);
  padding: 8px 14px 8px 10px; border-radius: 999px; background: rgba(255,255,255,.94); color: var(--ink);
  font-size: calc(18px * var(--gk, 1)); font-weight: 700; line-height: 1.1; white-space: nowrap; }
.lk-gface__pill > span { overflow: hidden; text-overflow: ellipsis; }
.lk-gface__pill .lkg-ico { width: 20px; height: 20px; color: var(--wrap-d); }
.lk-gface__hit { position: absolute; inset: 0; z-index: 2; display: block; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 12px;
  background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.lk-gface__hit:focus-visible { outline: 3px solid var(--ink); outline-offset: -3px; }
.lk-gface__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lk-gface__img--fit { object-fit: contain; }
.lk-gface__video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; background: #15131c; object-fit: contain; }
.lk-gface__video:focus-visible { outline: 3px solid var(--ink); outline-offset: -3px; }

/* видео: обложка или градиент направления в точку, белый диск ▶ */
.lk-gface__art { position: absolute; inset: 0; background: linear-gradient(135deg, var(--wrap-l), var(--wrap) 55%, var(--wrap-d)); }
.lk-gface__art::before { content: ""; position: absolute; inset: 0; background: radial-gradient(rgba(255,255,255,.2) 1.6px, transparent 2.2px) 0 0 / 22px 22px; }
.lk-gface__disc { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,.25); display: grid; place-items: center; }
.lk-gface__disc::before { content: ""; margin-left: 7px; border-left: 25px solid var(--wrap-d); border-top: 15px solid transparent; border-bottom: 15px solid transparent; }

/* голосовое и аудио: одна кнопка, волна-ползунок, время (§6.2, решение 7) */
.lk-gface--voice, .lk-gface--audio { display: grid; align-content: end; min-height: 200px; padding: 62px 16px 16px; background: linear-gradient(160deg, var(--dir-t), #fff 85%); }
.lk-gplayer { display: grid; grid-template-columns: 72px 1fr; grid-template-rows: auto auto; gap: 6px 14px; align-items: center; }
.lk-gplayer__btn { grid-row: 1 / span 2; width: 72px; height: 72px; padding: 0; border: 0; border-radius: 50%; background: var(--wrap-d); color: #fff; cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 8px 20px rgba(34,32,43,.18); }
.lk-gplayer__btn .lkg-ico { width: 32px; height: 32px; }
.lk-gplayer__btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.lk-gplayer__track { position: relative; display: block; height: 48px; overflow: hidden; border-radius: 8px; }
.lk-gplayer__wave { position: absolute; inset: 0; display: flex; align-items: center; gap: 2px; }
.lk-gplayer__wave i { flex: 1 1 0; min-width: 0; border-radius: 2px; background: var(--wrap-d); }
.lk-gplayer__veil { position: absolute; inset: 0; background: rgba(255,255,255,.6); transform: translateX(0); }   /* «ещё не прослушано»: сдвиг transform'ом */
.lk-gplayer__range { position: absolute; inset: 0; width: 100%; height: 48px; margin: 0; padding: 0; background: transparent; cursor: pointer;
  -webkit-appearance: none; appearance: none; touch-action: none; }
.lk-gplayer__range:focus { outline: none; }
.lk-gplayer__range:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.lk-gplayer__range::-webkit-slider-runnable-track { height: 48px; background: transparent; border: 0; }
.lk-gplayer__range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 28px; height: 28px; margin-top: 10px; border-radius: 50%;
  background: #fff; border: 3px solid var(--wrap-d); box-shadow: 0 2px 8px rgba(34,32,43,.25); }
.lk-gplayer__range::-moz-range-track { height: 48px; background: transparent; border: 0; }
.lk-gplayer__range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--wrap-d); box-shadow: 0 2px 8px rgba(34,32,43,.25); }
.lk-gplayer__time { font-size: calc(18px * var(--gk, 1)); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }

/* PDF: два листа, первая страница на переднем, ярлык «PDF» */
.lk-gface--pdf { display: grid; place-items: center; min-height: 240px; padding: 58px 16px 22px; background: linear-gradient(160deg, var(--dir-t), #fff 90%); }
.lk-gface__sheets { position: relative; display: block; width: var(--sw, 120px); height: var(--sh, 170px); }
.lk-gface__sheet { position: absolute; inset: 0; display: block; border-radius: 6px; background: #fff; box-shadow: 0 10px 24px rgba(34,32,43,.16); }
.lk-gface__sheet--back { transform: translate(14px, -6px) rotate(4deg); opacity: .85; }
.lk-gface__sheet--front { transform: rotate(-3deg); overflow: hidden; }
.lk-gface__sheet--front::after { content: ""; position: absolute; top: 0; right: 0; width: 22px; height: 22px; border-bottom-left-radius: 4px;
  background: linear-gradient(45deg, #E9E3DA 50%, var(--dir-t) 50%); box-shadow: -2px 2px 4px rgba(34,32,43,.12); }   /* загнутый уголок */
.lk-gface__sheet--front img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.lk-gface__lines { position: absolute; left: 14px; right: 14px; top: 22px; bottom: 18px; display: block;
  background: repeating-linear-gradient(to bottom, #E4DFE7 0 6px, transparent 6px 16px); }
.lk-gface__tag { position: absolute; left: -12px; bottom: 16px; padding: 4px 10px; border-radius: 8px; background: var(--wrap-d); color: #fff;
  font-size: 22px; font-weight: 800; line-height: 1; letter-spacing: .02em; transform: rotate(-3deg); box-shadow: 0 4px 10px rgba(34,32,43,.2); }

/* документ: лист с крупным расширением и именем файла */
.lk-gface--doc { display: grid; place-items: center; min-height: 220px; padding: 58px 16px 22px; background: linear-gradient(160deg, var(--dir-t), #fff 90%); }
.lk-gface__file { display: grid; justify-items: center; gap: 6px; width: min(280px, 100%); padding: 22px 18px 18px; border-radius: 10px; background: #fff;
  box-shadow: 0 10px 24px rgba(34,32,43,.14); transform: rotate(-2deg); }
.lk-gface__ext { font-size: 28px; font-weight: 800; line-height: 1; color: var(--wrap-d); letter-spacing: .02em; }
.lk-gface__fname { max-width: 100%; font-size: 18px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ссылка: белый круг со значком, адрес сайта */
.lk-gface--link { display: grid; place-items: center; min-height: 220px; padding: 58px 16px 22px; background: linear-gradient(160deg, var(--dir-t), #fff 90%); }
.lk-gface__site { display: grid; justify-items: center; gap: 4px; text-align: center; }
.lk-gface__circle { width: 72px; height: 72px; border-radius: 50%; background: #fff; color: var(--wrap-d); display: grid; place-items: center; box-shadow: 0 8px 20px rgba(34,32,43,.12); margin-bottom: 6px; }
.lk-gface__circle .lkg-ico { width: 34px; height: 34px; }
.lk-gface__site b { font-size: 22px; font-weight: 800; overflow-wrap: anywhere; }
.lk-gface__site span:last-child { font-size: 18px; color: var(--ink-soft); }

/* ---------- без движения: «✦» и системная настройка ---------- */
.lk.is-quiet .gbox__in, .lk.is-quiet .gbox__spark, .lk.is-quiet .lk-giftbtn__badge, .lk.is-quiet .lk-mat::after, .lk.is-quiet .lk-gift::after { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .gbox__in, .gbox__spark, .lk-giftbtn__badge, .lk-gift.is-enter { animation: none !important; }
  .lk-gift, .lk-gift .gbox { transition: none !important; }
}
