/* ============ МОБИЛКА (MOB WIP, фигма 9:691) ============
   Плиты 400xH; JS: s = vw/400, высота секции = H*s.
   Показывается только на <=700px, десктопные секции скрыты. */

.m-stage { display: none; position: relative; overflow: hidden; }
.m-plate {
  position: absolute;
  left: 0;
  top: 0;
  width: 400px;
  transform-origin: top left;
}
.m-div { display: none; height: calc(100 * 100vw / 400); }

/* сфера-кольцо с анимированным объектом (деск и моб): гифка поверх кольца, как в фигме */
.m-item-anim { position: absolute; }
.m-item-anim img { position: absolute; display: block; }
.m-menu { display: none; }

@media (max-width: 700px) {
  .m-stage, .m-div { display: block; }
  .stage-hero { display: none; }

  /* -------- фикс-меню (mob menu 400x46, бургер 30x14 @185,16) -------- */
  .m-menu {
    display: block;
    position: fixed;
    left: 0;
    top: 0;
    width: 400px;
    height: 46px;
    transform-origin: top left;
    z-index: 40;
  }
  .m-burger {
    position: absolute;
    left: 185px;
    top: 16px;
    width: 30px;
    height: 14px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
  }
  .m-burger i {
    position: absolute;
    left: 0;
    width: 30px;
    height: 0;
    border-top: 1.5px solid #f0fbff;
  }
  .m-burger i:nth-child(1) { top: 0; }
  .m-burger i:nth-child(2) { top: 7px; }
  .m-burger i:nth-child(3) { top: 14px; }

  /* -------- общие атомы плит -------- */
  .m-abs { position: absolute; }
  .m-img { position: absolute; display: block; pointer-events: none; } /* декор не перехватывает тапы по сферам */


  /* hero text блока героя */
  .m-lednum {
    position: absolute;
    font-family: var(--ledboard);
    font-size: 66px;
    line-height: 66px;
    color: var(--ink);
  }
  .m-titlerow {
    position: absolute;
    height: 16px;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    white-space: nowrap;
  }
  .m-dots3 {
    font-family: var(--led);
    font-size: 14px;
    line-height: 12px;
    color: #7f7f7f;
  }
  .m-name {
    font-family: var(--verdana-ext);
    font-weight: 700;
    font-style: italic;
    font-size: 44px;
    line-height: 34px;
    letter-spacing: -0.1em;
    color: var(--ink);
  }
  .m-name-ru {
    font-family: var(--led);
    font-size: 12px;
    line-height: 11px;
    color: #7f7f7f;
  }
  .m-desc {
    position: absolute;
    margin: 0;
    font-family: var(--serif);
    font-size: 16px;
    line-height: 18.4px;
    color: var(--ink);
  }
  .m-meta {
    position: absolute;
    margin: 0;
    font-family: var(--led);
    font-size: 12px;
    line-height: 16.2px;
    color: #7f7f7f;
    white-space: pre;
  }

  /* видео-рамка (388x681.6, слот @32.6,40.3 322.8x600.9) */
  .m-videoframe { position: absolute; width: 388px; height: 681.6px; }
  .m-videoframe img { position: absolute; inset: 0; width: 100%; height: 100%; }
  .m-videoslot {
    position: absolute;
    left: 32.6px;
    top: 40.3px;
    width: 322.8px;
    height: 600.9px;
    background: #0d1114;
    object-fit: cover;    /* слот чуть у́же кадра — лишнее срезается по бокам */
    display: block;
  }

  /* подписи led (name block): ОПРАВА/ОБЪЕКТ + значение; строки не переносим (как в фигме) */
  .m-nb {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .m-nb-cap, .m-nb-val { white-space: nowrap; width: max-content; }
  .m-nb-cap {
    font-family: var(--led);
    font-size: 10px;
    line-height: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }
  .m-nb-val {
    margin-top: 10px;
    font-family: var(--ledboard);
    font-size: 22px;
    line-height: 22px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .m-nb-pink { color: #b878b5; }
  /* «ИДЕНТИФИКАЦИОННАЯ ОПТИКА:» длиннее плашки — две строки без разрядки, как на десктопе */
  .m-nb-pink .m-nb-cap { white-space: normal; width: auto; max-width: 112px; font-size: 9px; letter-spacing: 0; text-align: center; }
  .m-nb-blue { color: #78adb8; }

  /* слайдер 400x650, кадры 400x660 */
  .m-slider { position: absolute; left: 0; width: 400px; height: 650px; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
  .m-slider .m-track {
    display: flex;
    height: 660px;
    transition: transform 0.7s ease-in-out;
  }
  .m-slider img { width: 400px; height: 660px; object-fit: cover; flex: none; -webkit-user-drag: none; }

  /* текст «Оправа: X» у финального фото */
  .m-opr {
    position: absolute;
    margin: 0;
    font-family: var(--led);
    font-size: 14px;
    line-height: 16.8px;
    color: #b878b5;
    white-space: pre;
  }
  .m-opr b { font-weight: normal; color: #fff; } /* фигма: имя модели белым (посимвольный оверрайд) */

  /* блок описания айтема (235x293): подпись + текст + гифка */
  .m-idesc-text {
    position: absolute;
    margin: 0;
    width: 215px;
    font-family: var(--serif);
    font-size: 14px;
    line-height: 14px;
    text-align: center;
    color: #78adb8;
  }

  /* -------- интро (0 INTRO 400x800) -------- */
  .m-intro-bg {
    position: absolute;
    left: -117.4px;
    top: -91px;
    width: 644.9px;
    height: 1063px;
  }
  .m-org { position: absolute; left: 71px; top: 55px; width: 249px; height: 194px; } /* 29.09: −20 под длинный вводный текст */
  .m-org-img { position: absolute; left: 50%; top: 0; height: 100%; transform: translateX(-50%); }
  .m-lede {
    position: absolute;
    left: 44px;
    top: 272px; /* 29.09: было 314 — вводный текст длиннее */
    width: 312px;
    margin: 0;
    font-family: var(--serif);
    font-size: 18px;
    line-height: 22.5px;
    text-align: center;
    color: var(--ink);
  }
  .m-lede em { font-style: italic; }
  .m-arrow {
    position: absolute;
    left: 165px;
    top: 642px;
    width: 70px;
    height: 50px;
    animation: h-arrow-crawl 2s ease-in-out infinite;
  }

  /* -------- выбор персонажа (26:607, 400x700) -------- */
  .m-select { background: none; }
  .m-sel-ellipse {
    position: absolute;
    left: -23px;
    top: 578px;
    width: 445px;
    height: 141px;
    border-radius: 50%;
    border: 1px solid rgba(200,220,230,0.55);
    box-shadow: 0 0 24px rgba(79,87,236,0.47), inset 0 0 18px rgba(79,87,236,0.25);
  }
  /* герои на кругу (фигма 26:607): позы по дуге считает JS (RAF), вращается только передний */
  .m-sel-hero {
    position: absolute; /* left/top/размеры считает JS по фигма-слотам */
    pointer-events: none;
    will-change: left, top, height;
  }
  .m-sel-hero img { width: 100%; height: 100%; display: block; }
  /* холст вращения «сложенным кадром» ложится ровно поверх картинки-заглушки */
  .m-sel-hero .stack-canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
  /* холсты предметов и оправ: геометрия копируется из картинки-постера */
  .stack-ring { position: absolute; }
  /* свечение переднего героя (фигма: blur 94.8 rgba(0,193,251,.15) + blur 9.5 rgba(210,255,253,.35))
     запечено в кадры charglow-* — CSS-тень на анимации рисуется прямоугольником, а отдельный
     слой-силуэт не поспевает за вращением */
  .m-sel-main { position: absolute; left: 0; top: 0; width: 400px; height: 700px; z-index: 5; }
  .m-sel-main.is-swap { opacity: 0; }
  .m-sel-name {
    position: absolute;
    left: 58.1px;
    top: 52px;
    height: 13px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    white-space: nowrap;
  }
  .m-sel-name b {
    font-family: var(--verdana-ext);
    font-weight: 700;
    font-style: italic;
    font-size: 36px;
    line-height: 28px;
    letter-spacing: -0.1em;
    color: var(--ink);
  }
  .m-sel-name span {
    font-family: var(--led);
    font-size: 10px;
    line-height: 9px;
    color: #7f7f7f;
  }
  .m-sel-meta {
    position: absolute;
    left: 58.1px;
    top: 86px;
    margin: 0;
    font-family: var(--led);
    font-size: 10px;
    line-height: 13.3px;
    color: #7f7f7f;
    white-space: pre;
  }
  .m-sel-num {
    position: absolute;
    left: 58.1px;
    top: 143.9px;
    font-family: var(--ledboard);
    font-size: 54px;
    line-height: 54px;
    color: var(--ink);
  }
  .m-sel-photo { position: absolute; left: 76.8px; top: 98.7px; width: 246.6px; height: 493.3px; object-fit: contain; }
  .m-sel-arr {
    position: absolute;
    top: 738px;
    width: 34px;
    height: 34px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 5;
  }
  .m-sel-arr::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 11px;
    height: 11px;
    border-left: 1.5px solid #f0fbff;
    border-bottom: 1.5px solid #f0fbff;
    filter: drop-shadow(0 0 5px rgba(197,96,255,0.8));
  }
  .m-sel-prev { left: 128.5px; }
  .m-sel-prev::before { transform: translate(-50%,-50%) rotate(45deg); }
  .m-sel-next { left: 237.5px; }
  .m-sel-next::before { transform: translate(-50%,-50%) rotate(225deg); }

  /* -------- VHS (380x660 @10) -------- */
  .m-vhs-video {
    position: absolute;
    left: 10px;
    top: 0;
    width: 380px;
    height: 660px;
    object-fit: cover;
  }

  /* -------- магазин (карточки 380x241 @10) -------- */
  .m-card { position: absolute; left: 10px; width: 380px; height: 241px; }
  .m-card-img { position: absolute; left: 10px; top: 10px; width: 360px; height: 150px; display: flex; align-items: center; justify-content: center; }
  .m-card-img img { max-width: 100%; max-height: 100%; transition: opacity 0.15s ease-in-out; }
  .m-card-row {
    position: absolute;
    top: 180px;
    left: 0;
    width: 380px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
  }
  .m-card-row .shop-dots { height: 20px; cursor: pointer; }
  .m-card-name {
    font-family: var(--verdana-ext);
    font-weight: 700;
    font-style: italic;
    font-size: 44px;
    line-height: 30px;
    letter-spacing: -0.1em;
    color: var(--ink);
    filter: drop-shadow(0 0 6px rgba(240,251,255,0.35));
  }
  .m-card-btns {
    position: absolute;
    top: 220px;
    left: 0;
    width: 380px;
    display: flex;
    justify-content: center;
    gap: 20px;
  }
  .m-card-btns a {
    font-family: var(--led);
    font-size: 14px;
    line-height: 14px;
    color: rgba(255,255,255,0.35);
    text-decoration: none;
    transition: color 0.15s ease-in-out;
  }
  .m-card-btns a:hover { color: #fff; }

  /* -------- карта (400x800) -------- */
  .m-map-window {
    position: absolute;
    left: 27px;
    top: 91px;
    width: 346px;
    height: 619px;
    overflow: hidden;
    background: rgba(0,0,0,0.75);
    touch-action: pan-y;
  }
  .m-map-layer {
    position: absolute;
    left: -364px;
    top: -138px;
    width: 1074px;
    height: 895px;
    transition: transform 0.3s ease-out;
  }
  .m-map-text {
    position: absolute;
    left: 23px;
    top: 202px;
    width: 300px;
    margin: 0;
    font-family: var(--serif);
    font-size: 16px;
    line-height: 18.4px;
    text-align: center;
    color: var(--ink);
  }
  .m-map-cta { position: absolute; left: 84px; top: 369px; width: 177px; height: 36px; }
  .m-map-cta img { width: 100%; height: 100%; }

  /* -------- кредиты (400x517) -------- */
  .m-cr-logo { position: absolute; left: 115px; top: 0; width: 169.7px; height: 145.1px; }
  .m-cr-brand {
    position: absolute;
    left: 80px;
    top: 142px;
    width: 238px;
    text-align: center;
    font-family: var(--led);
    font-size: 10px;
    line-height: 10px;
    text-transform: uppercase; /* фигма: textCase UPPER */
  }
  .m-cr-brand .c1 { color: #fff; }
  .m-cr-brand .c2 { margin: 6px -40px 0; white-space: nowrap; color: rgba(255,255,255,0.5); } /* [Telegram] длиннее [email] — не переносим */
  .m-cr-brand .c2 a { color: inherit; text-decoration: none; }
  .m-cr-credits {
    position: absolute;
    left: 28px;
    top: 192px;
    width: 344px;
    margin: 0;
    font-family: var(--serif);
    font-size: 12px;
    line-height: 14.4px;
    text-align: center;
    color: rgba(255,255,255,0.5);
  }
  .m-cr-legal {
    position: absolute;
    left: 12px;
    top: 388px;
    width: 375px;
    font-family: var(--led);
    font-size: 8px;
    line-height: 10.4px;
    text-align: center;
    color: rgba(255,255,255,0.2);
    text-transform: uppercase; /* фигма: textCase UPPER */
  }
  .m-cr-legal img { height: 10px; vertical-align: middle; margin: 0 4px; opacity: 0.6; }
  .m-cr-policies {
    position: absolute;
    left: 47px;
    top: 503px;
    width: 305px;
    font-family: var(--serif);
    font-size: 9px;
    line-height: 10.8px;
    letter-spacing: 0.05em;
    text-align: center;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase; /* фигма: textCase UPPER */
  }

  /* -------- мобильная раскладка загрузки (Frame 252) -------- */
  .l-center { top: 46.6%; }
  .l-bar { width: 71.5vw; max-width: 286px; }
}

@media (prefers-reduced-motion: reduce) {
  .m-arrow { animation: none; }
  .m-sel-main, .m-slider .m-track { transition: none; }
}

  /* -------- открытое меню (фигма «mob menu», состояние Frame 265: 400x800) --------
     Позиции взяты из узлов макета, декоративные части — рендеры оттуда же. */
  .m-menu-panel {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: #000;
    overflow: hidden;
  }
  .m-menu-panel[hidden] { display: none; }
  .m-menu-plate {
    position: absolute;
    left: 0;
    top: 0;
    width: 400px;
    height: 800px;
    transform-origin: top left;
  }
  .m-menu-plate > * { position: absolute; }
  .m-menu-close {
    left: 189px; top: 12px; width: 21px; height: 21px;
    background: none; border: none; padding: 0; cursor: pointer;
  }
  .m-menu-close img { width: 100%; height: 100%; display: block; }
  .m-menu-emblem { left: 124px; top: 156px; width: 185px; height: 185px; }
  .m-menu-links {
    left: 10px; top: 90px; width: 114px;
    margin: 0; padding: 0; list-style: none;
    text-align: center;
  }
  .m-menu-links li { height: 38px; }        /* шаг между пунктами в макете */
  .m-menu-links a,
  .m-menu-links span {
    font-family: "OCR A Becker", monospace;
    font-size: 10px;
    line-height: 8px;
    color: #fff;
    text-decoration: none;
    transition: color 0.15s ease-out;
  }
  .m-menu-links a:hover,
  .m-menu-links a:active { color: #f0e14a; }  /* жёлтый при наведении — как в компонентах */
  .m-menu-map { left: 134px; top: 341px; width: 256px; height: 276px; text-decoration: none; }
  .m-menu-map img { position: absolute; left: 6px; top: 17px; width: 240px; height: 200px; }
  .m-menu-map span {
    position: absolute; left: 70px; top: 249px; width: 116px;
    font-family: "OCR A Becker", monospace; font-size: 10px; color: #78adb8;
  }
  .m-menu-glow { left: 120px; top: 631px; width: 170px; height: 145px; pointer-events: none; }
  .m-menu-logo { left: 166px; top: 678px; width: 67px; height: 68px; }
  .m-menu-foot {
    left: 81px; top: 762px; width: 238px;
    font-family: "OCR A Becker", monospace; font-size: 10px; line-height: 14px;
    color: #fff; text-align: center;
  }
  .m-menu-foot p { margin: 0; }
