/* Ateliere IS89 · modul telefon (pornit din IS89 · Martorul anonim v0.7)
   player.js pune clasa .m pe <html> când pânza de 1920 × 1224 ar face textul prea mic (telefon, tabletă în picioare,
   fereastră îngustă). Atunci ecranele curg pe o singură coloană și pagina se derulează în sus și în jos.
   Conținutul ecranelor și al ferestrelor e mărit cu zoom: --z (0,55–0,75), pe o lățime „de pânză” --vw (în medie 600 px).
   Bara de control, subtitrarea, logo-ul de la început și mesajele sunt în pixeli reali.
   .m-wide = ecran lat (telefon culcat, tabletă): unele liste trec pe două coloane. */

/* ---------- Pagina ---------- */
html.m { height: auto; min-height: 100%; overflow-x: hidden; overflow-y: auto; background: var(--table); scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.m body { height: auto; min-height: 100%; overflow: visible; background: var(--table); }
html.m.has-modal, .m.has-modal body { overflow: hidden; }
.m .app { position: relative; width: 100%; height: auto; transform: none !important; }
.m .stage { width: 100%; height: auto; min-height: 100vh; min-height: 100svh; overflow: visible; padding-bottom: 56px; background: var(--table); }
.m .stage:has(.slide--final) { background: var(--film); }
.m .slide { position: relative; inset: auto; width: var(--vw); zoom: var(--z); }

/* ---------- Antet ---------- */
.m .hdr { position: relative; height: auto; gap: 14px; padding: 22px 28px 16px; }
.m .hdr-logo { width: 92px; }
.m .hdr-mod { min-width: 0; flex-direction: column; align-items: flex-start; gap: 2px; font-size: 21px; }
.m .hdr-chap::before { display: none; }
.m .hdr-course, .m .hdr-chap { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m .hdr-frame { font-size: 28px; gap: 8px; }
.m .hdr-frame span { font-size: 18px; }
.m .rule-dots { position: relative; left: auto; right: auto; top: auto; margin: 0 28px; }
.m .body { position: relative; inset: auto; padding: 30px 28px 48px; }
.m-wide .body, .m-wide .cover, .m-wide .final { padding-left: max(28px, calc((var(--vw) - 1060px) / 2)); padding-right: max(28px, calc((var(--vw) - 1060px) / 2)); }

/* ---------- Tipografie și elemente comune ---------- */
.m .h1 { margin-bottom: 26px; font-size: 46px; }
.m .h1--q { font-size: 38px; }
.m .h2 { font-size: 38px; }
.m .lead { font-size: 29px; }
.m .small { font-size: 22px; }
.m .btn-row { gap: 16px; }
.m .field textarea { max-height: 360px; }
.m .field .count { font-size: 21px; }
/* Câmpurile de scris au cel puțin 16 px pe ecran: altfel iPhone-ul mărește pagina când elevul atinge câmpul. */
.m .field textarea, .m .field input[type=text], .m .fisa-row input, .m .fisa-row textarea, .m .vz-slot input, .m .qz-mrow select { font-size: max(24px, calc(16.5px / var(--z))); }
.m .big-n { gap: 18px; }
.m .big-n .stat-n { font-size: 84px; }
.m .chips li { font-size: 23px; }

/* ---------- Copertă: logo, steagul, apoi titlul ---------- */
.m .cover { position: relative; inset: auto; display: flex; flex-direction: column; align-items: flex-start; padding: 30px 28px 60px; }
.m .cover-copy { display: contents; }
.m .cover-logo { order: 0; width: 132px; margin: 0 0 26px; }
.m .cover-flag { order: 1; position: relative; right: auto; top: auto; width: 100%; height: auto; aspect-ratio: 3 / 2; }
.m .cover-badge { order: 2; position: relative; }
.m .cover-badge:not(.cover-badge--txt) { left: auto; top: auto; align-self: flex-end; width: 176px; height: 176px; margin: -84px 6px 0 0; font-size: 21px; }
.m .cover-badge-n { font-size: 80px; }
.m .cover-badge--txt { right: auto; top: auto; margin-top: 18px; font-size: 21px; }
.m .cover-kicker { order: 3; margin: 30px 0 14px; font-size: 25px; }
.m .cover-title { order: 4; font-size: 72px; }
.m .cover-sub { order: 5; margin-top: 22px; font-size: 26px; }
.m .cover-who { order: 6; }
.m .btn--go { order: 7; margin-top: 34px; }

/* ---------- Afiș și split: imaginea deasupra ---------- */
.m .poster { display: flex; flex-direction: column; align-items: stretch; gap: 30px; height: auto; }
.m .poster-img { width: 100%; height: auto; aspect-ratio: 16 / 9; padding: 8px; }
.m .poster-panel > .h1 { font-size: 44px; }
.m .poster-panel > .h1--q { font-size: 36px; }
.m .split { display: flex; flex-direction: column; align-items: stretch; gap: 28px; height: auto; }
.m .split-img { order: -1; width: 100%; height: auto; aspect-ratio: 1; padding: 8px; }
.m .split-img img { object-position: 50% 28%; }
.m .split-copy > * { margin-top: 18px; }
.m .split-copy > .h1 + * { margin-top: 22px; }

/* ---------- Conținut lat ---------- */
.m .wide { height: auto; }
.m .wide > .lead { margin-top: 30px; }
.m .wide > .note { margin-top: 26px; }
.m .strip { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 44px 22px; }
.m-wide .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.m .strip-f { min-height: 0; padding: 24px 24px 26px; }
.m .strip-y { font-size: 64px; }
.m .strip-f--photo .print img { height: auto; }
.m .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.m .stats li { min-height: 0; padding: 26px 24px; }
.m .stats .stat-n { font-size: 128px; }
.m .stats li > span:last-child { font-size: 25px; }
.m .cards--3, .m .cards--2x2 { grid-template-columns: minmax(0, 1fr); }
.m-wide .cards--2x2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.m .cards--3 .card { min-height: 0; }
.m .card { padding: 24px 26px; }
.m .card-h { font-size: 34px; }
.m .steps--big { grid-template-columns: minmax(0, 1fr); gap: 36px; }
.m .steps--big .step { min-height: 0; padding: 24px 26px; }
.m .steps--big .step:not(:last-child)::after { right: auto; left: 50%; top: auto; bottom: -28px; margin: 0 0 0 -10px; rotate: 135deg; }
.m .steps--big .step-n { font-size: 56px; margin-bottom: 0; }
.m .steps--wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.m .qlist li { grid-template-columns: 62px minmax(0, 1fr); font-size: 27px; }
.m .prints { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.m .row2 { grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 30px; }
.m .tracks { padding: 24px 20px 22px; }
.m .tracks::after { left: 82%; bottom: 96px; }
.m .track { grid-template-columns: 62px minmax(0, 1fr); gap: 12px; }
.m .track-k { font-size: 32px; }
.m .track-c, .m .track-c--b, .m .track-c--c, .m .track--a .track-c { width: 100%; margin-left: 0; height: 72px; padding: 0 16px; font-size: 22px; }
.m .track-out { margin-left: 74px; }
.m .track-out span { height: auto; padding: 12px 18px; font-size: 22px; }
.m .photo4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.m-wide .photo4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.m .photo4-n { font-size: 26px; }
.m .flow { gap: 12px 42px; }
.m .fisa-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
.m .fisa { padding: 24px 22px; }
.m .fisa-row { grid-template-columns: minmax(0, 1fr); }
.m .fisa-row--ta .fisa-k { padding-top: 0; }
.m .fisa-row .wc { grid-column: 1; }
.m .rule-card-t { font-size: 30px; }

/* ---------- Final ---------- */
.m .final { position: relative; inset: auto; min-height: var(--vhz); padding: 64px 28px 50px; }
.m .final-title { font-size: 42px; }
.m .final-strip { flex-wrap: wrap; }
.m .final-frame { flex: 1 1 150px; padding: 16px 18px 20px; }
.m .final-frame > span:last-child { font-size: 27px; }
.m .final-q { margin-top: 32px; }
.m .final-details { grid-template-columns: minmax(0, 1fr); }
.m-wide .final-details { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.m .final-foot { flex-direction: column; align-items: stretch; gap: 24px; margin-top: 44px; }
.m .final-logos { flex-wrap: wrap; justify-content: center; gap: 22px 30px; padding: 16px 20px; }
.m .final-logos img { height: 44px; }
.m .final-logos img.logo-tall { height: 58px; }
.m .final .btn--go { margin: 0; }
.m .final-credits { font-size: 19px; }

/* ---------- Exerciții ---------- */
.m .xp { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
.m .xp-left, .m .xp-side { display: contents; }
.m .xp-main { order: 1; } .m .xp-led { order: 2; } .m .xp-ctl { order: 3; } .m .xp-shoot { order: 4; } .m .xp-fb { order: 5; } .m .xp-missions { order: 6; } .m .xp-roll { order: 7; }
.m .xp-missions { grid-template-columns: minmax(0, 1fr); }
.m-wide .xp-missions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.m .xp-scene.xp-main { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.m .xp-led { flex-wrap: wrap; gap: 10px 18px; height: auto; padding: 12px 16px; }
.m .xp-led-v { font-size: 26px; }
.m .xp-scale { margin-left: 0; }
.m .xp-meter-t { min-width: 0; text-align: left; }
.m .xp-roll { overflow-x: auto; }
.m .xp-shoot { flex-wrap: wrap; }
.m .vz { grid-template-columns: minmax(0, 1fr); gap: 24px; }
.m .vz-stage { max-width: 100%; }
.m .vz-slot { grid-template-columns: 120px minmax(0, 1fr); }
.m .vz-crop { width: 120px; }
.m .final-detail .vz-crop { width: 100%; }
.m .pc-form { grid-template-columns: minmax(0, 1fr); gap: 26px; }
.m .qz { grid-template-columns: minmax(0, 1fr); gap: 26px; }
.m .qz-text { font-size: 30px; }
.m .qz-order { grid-template-columns: minmax(0, 1fr); }
.m .qz-mrow { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.m .qz-opts .optl { grid-template-columns: 40px 32px minmax(0, 1fr); padding: 16px 18px; }

/* ---------- Ferestre: pe tot ecranul, cu butonul de închidere mereu sus ---------- */
.m .modal { position: fixed; inset: 0; z-index: 40; display: block; background: rgba(31, 29, 30, .6); }
.m .modal-panel { position: absolute; inset: 0; width: auto !important; height: auto !important; max-height: none; display: flex; flex-direction: column;
  padding: 0; border-radius: 0; overflow: hidden; box-shadow: none; }
.m .modal-body { display: block; flex: 1; min-height: 0; width: var(--vw); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  zoom: var(--z); padding: 96px 28px 48px; }
.m .modal-x { top: 12px; right: 12px; z-index: 3; width: 44px; height: 44px; border-width: 2px; }
.m .modal-x svg { width: 20px; height: 20px; }
.m .menu-item { padding: 16px 20px; font-size: 26px; }
.m .menu-ios { margin-top: 6px; }
.m .confirm .h2 { padding-right: 0; }

/* ---------- Mesaje (pixeli reali) ---------- */
.m .banner { position: fixed; left: 10px; right: 10px; bottom: 66px; max-width: none; gap: 12px; padding: 12px 10px 12px 16px; border-left-width: 5px; font-size: 15px; z-index: 35; }
.m .banner > svg { width: 22px !important; height: 22px !important; }
.m .banner .x { width: 38px; height: 38px; }
.m .banner .x svg { width: 16px; height: 16px; }
.m .toast { position: fixed; left: 50% !important; translate: -50% 0; bottom: 70px; width: max-content; max-width: calc(100vw - 20px); gap: 8px; padding: 10px 18px; border-width: 2px; font-size: 15px; z-index: 35; }
.m .toast svg { width: 18px; height: 18px; }

/* ---------- Logo-ul animat de la început și ecranul de ieșire ---------- */
.m .intro { position: fixed; inset: 0; }
.m .intro video, .m .intro img { width: 100%; height: 100%; max-width: 100vw; max-height: 100vh; object-fit: contain; }
.m .intro .skip { position: fixed; right: 14px; bottom: 16px; min-height: 48px; padding: 0 22px; border-width: 2px; font-size: 16px; }
.m .end { position: fixed; inset: 0; padding: 24px; }
.m .end img { width: 60vw; max-width: 320px; height: auto; margin: 0 auto; }
.m .end .end-t { font-size: 18px; }
.m .end .lead { font-size: 18px; margin-top: 16px; }
.m .end .end-credit { font-size: 14px; }

/* ---------- Subtitrarea și bara de control (pixeli reali, jos pe ecran) ---------- */
.m .cc { position: fixed; left: 0; right: 0; bottom: 56px; z-index: 30; height: auto; justify-content: flex-start; padding: 8px 14px 9px; font-size: 15px; line-height: 1.35; }
.m .cc.is-off { display: none; }
.m .cc span { max-width: none; padding-left: 10px; border-left-width: 3px; }
.m .bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; height: 56px; gap: 2px; padding: 0 6px; }
.m .bar-btn { height: 44px; min-width: 44px; padding: 0 9px; gap: 6px; font-size: 15px; justify-content: center; }
.m .bar-btn svg { width: 22px; height: 22px; }
.m .bar-label { display: none; }
.m .bar-voice { gap: 0; padding: 0 2px; border: 0; }
.m .bar-nav { gap: 4px; margin-left: 2px; }
.m .bar-nav .bar-btn { padding: 0 12px; }
.m .bar-rate { min-width: 44px; }
/* pe telefon ținut în picioare: doar ce încape (textele rămân pentru cititoarele de ecran) */
.m #bMenu span, .m #bVoice span, .m #bPrev span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 599px) {
  .m #bSkip, .m #bRate, .m #bReplay { display: none; }
}
@media (max-width: 379px) {
  .m #bNext span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .m .bar-btn { min-width: 42px; padding: 0 8px; }
}
@media (min-width: 720px) {
  .m .bar-label { display: block; max-width: 260px; margin-left: 4px; font-size: 14px; }
  .m #bMenu span, .m #bPrev span { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
}
.m .menu-groups { columns: 1; }
.m-wide .menu-groups { columns: 2; }
.m .end-in { padding: 0; }
.m .split-photo { order: -1; }
