/*
 * Portal no celular: casca de app (abaixo de 992 px, o mesmo corte em que
 * a navbar vira gaveta). Carregado por layouts/main.php depois de
 * portal-access-modal.css. Usa só os tokens --portal-*.
 * O layout marca <body class="pm-app"> nas telas que recebem a casca.
 */

.pm-shell { display: none; }
.pm-shell [data-pm-community][hidden], .pm-shell .pm-tab__dot[hidden] { display: none; }

/* Skeleton da navegação móvel; conteúdo usa portal-loading.css em todas as larguras. */
@media (max-width: 991.98px) {
@keyframes pm-shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.pm-sk {
  background: linear-gradient(100deg, color-mix(in srgb, var(--portal-ink) 9%, transparent) 30%, color-mix(in srgb, var(--portal-ink) 17%, transparent) 50%, color-mix(in srgb, var(--portal-ink) 9%, transparent) 70%) 0 0 / 220% 100%;
  animation: pm-shimmer 1.3s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .pm-sk { animation: none; } }
}

@media (max-width: 991.98px) {
  :root {
    --pm-row: 50px;
    --pm-subnav: 0px;
    --pm-tabs: 58px;
    --pm-gutter: 16px;
    --pm-safe-top: env(safe-area-inset-top, 0px);
    --pm-safe-bottom: env(safe-area-inset-bottom, 0px);
    --pm-hairline: var(--portal-border);
    --pm-ease: cubic-bezier(.32, .72, 0, 1);
    --pm-player: min(56.25vw, 46dvh);
  }
  html.all-black { --pm-sheet: var(--portal-surface); --pm-group: var(--portal-surface-2); }
  html.light { --pm-sheet: var(--portal-surface); --pm-group: var(--portal-surface-2); }
  html:has(.pm-shell--subnav) { --pm-subnav: 42px; }
  html:has(.pm-shell--lesson) { --pm-tabs: 64px; }

  /* Troca de tela: cabeçalho e abas ficam parados; o conteúdo cruza entre abas,
     entra pela direita ao abrir uma tela interna e sai pela direita ao voltar.
     A direção vem de <html data-pm-nav>, definido no <head> antes da primeira pintura. */
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; animation-timing-function: ease; }
  html[data-pm-nav="push"]::view-transition-old(root) { animation: pm-vt-out-left .3s var(--pm-ease) both; }
  html[data-pm-nav="push"]::view-transition-new(root) { animation: pm-vt-in-right .3s var(--pm-ease) both; }
  html[data-pm-nav="back"]::view-transition-old(root) { animation: pm-vt-out-right .28s var(--pm-ease) both; }
  html[data-pm-nav="back"]::view-transition-new(root) { animation: pm-vt-in-left .28s var(--pm-ease) both; }
  @keyframes pm-vt-in-right { from { transform: translateX(26%); opacity: 0; } }
  @keyframes pm-vt-out-left { to { transform: translateX(-14%); opacity: 0; } }
  @keyframes pm-vt-in-left { from { transform: translateX(-14%); opacity: 0; } }
  @keyframes pm-vt-out-right { to { transform: translateX(26%); opacity: 0; } }
  .pm-tabs { view-transition-name: pm-tabs; }
  .pm-bar { view-transition-name: pm-bar; }
  ::view-transition-group(pm-tabs), ::view-transition-group(pm-bar) { animation-duration: .2s; z-index: 2; }

  /* Esqueleto da próxima tela: cobre o conteúdo no toque, enquanto a página chega. */
  .pm-skeleton { position: fixed; inset: 0; z-index: 1031; overflow: hidden; padding: 14px var(--pm-gutter) 0; background: var(--portal-bg); opacity: 0; transition: opacity .12s ease; }
  .pm-skeleton[hidden] { display: none; }
  .pm-skeleton.is-on { opacity: 1; }
  .pm-navigation-notice:not([hidden]) { position: fixed; z-index: 1036; left: 16px; right: 16px; bottom: calc(var(--pm-tabs) + var(--pm-safe-bottom) + 12px); display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--portal-border); border-radius: 12px; background: var(--portal-surface); color: var(--portal-ink); }
  .pm-skeleton .pm-sk { display: block; border-radius: 10px; }
  .pm-sk-line { height: 14px; margin: 0 0 12px; border-radius: 7px !important; }
  .pm-sk-title { width: 46%; height: 18px; margin: 4px 0 14px; }
  .pm-sk-search { height: 46px; margin: 0 0 16px; border-radius: 12px !important; }
  .pm-sk-wide { aspect-ratio: 16 / 11; margin: 0 28px 26px 0; border-radius: 12px !important; }
  .pm-sk-row { display: grid; grid-template-columns: 60% 60%; gap: 10px; margin: 0 calc(-1 * var(--pm-gutter)) 26px 0; }
  .pm-sk-row > .pm-sk { aspect-ratio: 16 / 13; border-radius: 12px !important; }
  .pm-sk-card { aspect-ratio: 16 / 13; margin: 0 0 14px; border-radius: 12px !important; }
  .pm-sk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; }
  .pm-sk-grid > .pm-sk { aspect-ratio: 3 / 4; }
  .pm-sk-item { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; margin: 0 0 18px; }
  .pm-sk-item > .pm-sk:first-child { width: 44px; height: 44px; border-radius: 12px !important; }
  .pm-sk-item > div > .pm-sk-line:last-child { width: 55%; margin: 0; height: 11px; }
  .pm-sk-player { height: var(--pm-player); margin: -14px calc(-1 * var(--pm-gutter)) 16px; border-radius: 0 !important; }
  .pm-sk-lesson { display: grid; grid-template-columns: 104px 1fr; gap: 12px; align-items: center; margin: 0 0 14px; }
  .pm-sk-lesson > .pm-sk:first-child { aspect-ratio: 16 / 9; border-radius: 8px !important; }

  html { scroll-padding-top: calc(var(--pm-safe-top) + var(--pm-row) + var(--pm-subnav) + 8px); }
  body.pm-app {
    padding-top: calc(var(--pm-safe-top) + var(--pm-row) + var(--pm-subnav));
    padding-bottom: calc(var(--pm-tabs) + var(--pm-safe-bottom));
    overscroll-behavior-y: none;
    -webkit-tap-highlight-color: transparent;
  }

  /* O acionador de diagnóstico deixa livres as abas e a faixa da aula. */
  body.pm-app #opb-dev-tools { bottom: calc(var(--pm-tabs) + var(--pm-safe-bottom) + 16px); }
  body.pm-app #opb-dev-tools .opb-dev-panel { max-height: min(650px, calc(100dvh - var(--pm-tabs) - var(--pm-safe-bottom) - 95px)); }

  /* Sai o que a casca substitui. */
  body.pm-app > nav.portal-topbar,
  body.pm-app > #mobileMenu,
  body.pm-app > footer.app-footer,
  body.pm-app [data-cc-invite] > [data-cc-pill] { display: none !important; }

  .pm-shell { display: block; }
  .pm-ico { width: 22px; height: 22px; flex: 0 0 auto; }

  /* ── Cabeçalho ─────────────────────────────────────────────────────── */
  .pm-bar {
    position: fixed; inset: 0 0 auto 0; z-index: 1035;
    padding-top: var(--pm-safe-top);
    background: color-mix(in srgb, var(--portal-bg) 94%, transparent);
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    backdrop-filter: saturate(160%) blur(18px);
    border-bottom: 1px solid var(--pm-hairline);
  }
  .pm-shell--lesson .pm-bar { background: var(--portal-bg); border-bottom-color: transparent; }
  .pm-bar__row { display: flex; align-items: center; gap: 10px; height: var(--pm-row); padding: 0 8px 0 var(--pm-gutter); }
  .pm-bar__mark { display: inline-flex; border-radius: 7px; overflow: hidden; flex: 0 0 auto; }
  .pm-bar__mark img { display: block; }
  .pm-bar__back { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-left: -10px; color: var(--portal-ink); border-radius: 50%; }
  .pm-bar__title { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 1.125rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; color: var(--portal-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pm-bar__actions { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
  .pm-bar__btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--portal-ink); }
  .pm-bar__btn:active, .pm-bar__back:active { background: color-mix(in srgb, var(--portal-ink) 10%, transparent); }
  .pm-bar__badge { position: absolute; top: 6px; right: 5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--portal-brand); color: var(--portal-brand-ink); font-size: .65rem; font-weight: 700; line-height: 16px; text-align: center; }
  .pm-bar__count { margin-right: 10px; font-size: .82rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--portal-muted); }
  .pm-bar__enter { display: inline-flex; align-items: center; height: 34px; margin-right: 8px; padding: 0 14px; border: 1px solid var(--pm-hairline); border-radius: 999px; color: var(--portal-ink); font-size: .85rem; font-weight: 600; text-decoration: none; }

  .pm-subnav { display: flex; gap: 22px; height: 42px; padding: 0 var(--pm-gutter); overflow-x: auto; scrollbar-width: none; }
  .pm-subnav::-webkit-scrollbar { display: none; }
  .pm-subnav__item { position: relative; display: inline-flex; align-items: center; flex: 0 0 auto; height: 100%; font-size: .9rem; font-weight: 600; color: var(--portal-muted); text-decoration: none; white-space: nowrap; }
  .pm-subnav__item.is-active { color: var(--portal-ink); }
  .pm-subnav__item.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--portal-brand); }

  /* ── Barra de abas ─────────────────────────────────────────────────── */
  .pm-tabs {
    position: fixed; inset: auto 0 0 0; z-index: 1035;
    display: grid; grid-template-columns: repeat(5, 1fr);
    height: calc(var(--pm-tabs) + var(--pm-safe-bottom));
    padding: 0 4px var(--pm-safe-bottom);
    background: color-mix(in srgb, var(--portal-bg) 96%, transparent);
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    backdrop-filter: saturate(160%) blur(18px);
    border-top: 1px solid var(--pm-hairline);
  }
  .pm-tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--portal-muted); text-decoration: none; font: inherit; }
  html.all-black .pm-tab { color: color-mix(in srgb, var(--portal-ink) 58%, transparent); }
  .pm-tab__ico { width: 24px; height: 24px; transition: transform .2s var(--pm-ease); }
  .pm-tab__ico-wrap { position: relative; display: inline-flex; }
  .pm-tab__label { font-size: .68rem; font-weight: 600; letter-spacing: .01em; line-height: 1; white-space: nowrap; }
  .pm-tab.is-active, html.all-black .pm-tab.is-active { color: var(--portal-ink); }
  .pm-tab.is-active .pm-tab__ico { stroke-width: 2.1; }
  .pm-tab.is-active::before { content: ""; position: absolute; top: -1px; left: 50%; width: 22px; height: 2px; margin-left: -11px; border-radius: 0 0 2px 2px; background: var(--portal-brand); }
  .pm-tab:active .pm-tab__ico { transform: scale(.9); }
  .pm-tab__dot { position: absolute; top: -2px; right: -5px; width: 9px; height: 9px; border: 2px solid var(--portal-bg); border-radius: 50%; background: #5865f2; box-sizing: content-box; }
  .pm-bar__btn:focus-visible, .pm-bar__back:focus-visible, .pm-tab:focus-visible, .pm-subnav__item:focus-visible, .pm-row:focus-visible, .pm-invite:focus-visible, .pm-seg button:focus-visible { outline: 2px solid var(--portal-brand); outline-offset: -2px; }

  /* ── Folhas ────────────────────────────────────────────────────────── */
  .pm-sheet {
    position: fixed; inset: auto 0 0 0; z-index: 1080;
    width: 100%; max-width: 560px; max-height: calc(100dvh - var(--pm-safe-top) - 28px);
    margin: 0 auto; padding: 0; overflow: hidden;
    border: 0; border-top: 1px solid var(--pm-hairline); border-radius: 22px 22px 0 0;
    background: var(--pm-sheet); color: var(--portal-ink);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, .35);
    transform: translateY(100%);
    transition: transform .3s var(--pm-ease);
  }
  .pm-sheet[open] { display: flex; flex-direction: column; }
  .pm-sheet.is-open { transform: translateY(var(--pm-drag, 0px)); }
  .pm-sheet.is-dragging { transition: none; }
  .pm-sheet::backdrop { background: rgba(0, 0, 0, .56); opacity: 0; transition: opacity .3s ease; }
  .pm-sheet.is-open::backdrop { opacity: 1; }
  .pm-sheet__grab { flex: 0 0 auto; display: flex; justify-content: center; padding: 9px 0 7px; touch-action: none; cursor: grab; }
  .pm-sheet__grab span { width: 38px; height: 4px; border-radius: 4px; background: color-mix(in srgb, var(--portal-ink) 26%, transparent); }
  .pm-sheet__body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 6px var(--pm-gutter) calc(18px + var(--pm-safe-bottom)); }
  .pm-sheet__title { margin: 2px 2px 14px; font-size: 1.125rem; font-weight: 700; line-height: 1.25; color: var(--portal-ink); }
  .pm-sheet__actions { display: grid; gap: 10px; }
  .pm-sheet__actions--row { grid-template-columns: 1fr 1.4fr; margin-top: 18px; }
  .pm-sheet__actions .btn { width: 100%; min-height: 48px; border-radius: 12px; font-size: 1rem; }

  .pm-me { display: flex; align-items: center; gap: 12px; padding: 4px 2px 16px; color: inherit; text-decoration: none; }
  .pm-me:focus-visible { outline: 2px solid var(--portal-brand); outline-offset: 2px; border-radius: 12px; }
  .pm-me__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .pm-me__name { font-size: 1.05rem; font-weight: 700; line-height: 1.25; color: var(--portal-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pm-me__mail { font-size: .82rem; color: var(--portal-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pm-me__tier { flex: 0 0 auto; padding: 5px 10px; border: 1px solid var(--pm-hairline); border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .08em; line-height: 1; color: var(--portal-ink); }
  .pm-me__tier--pro, .pm-me__tier--plus { border-color: color-mix(in srgb, var(--portal-brand) 55%, transparent); color: var(--portal-brand); }

  .pm-guest { display: grid; gap: 4px; padding: 4px 2px 16px; }
  .pm-guest strong { font-size: 1.05rem; font-weight: 700; line-height: 1.3; color: var(--portal-ink); }
  .pm-guest > span { font-size: .88rem; color: var(--portal-muted); }
  .pm-guest__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
  .pm-guest__actions .btn { min-height: 48px; border-radius: 12px; font-size: 1rem; }

  .pm-upgrade { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; margin: 0 0 12px; border-radius: 12px; font-size: .95rem; }

  .pm-invite { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 12px; padding: 12px 12px 12px 14px; border: 0; border-radius: 14px; background: var(--pm-group); color: var(--portal-ink); font: inherit; text-align: left; }
  .pm-invite__mark { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: #5865f2; flex: 0 0 auto; }
  .pm-invite__mark img { filter: brightness(0) invert(1); }
  .pm-invite__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: .82rem; color: var(--portal-muted); }
  .pm-invite__text strong { font-size: .95rem; font-weight: 700; color: var(--portal-ink); }

  .pm-list { margin: 0 0 12px; padding: 0; list-style: none; border-radius: 14px; background: var(--pm-group); overflow: hidden; }
  .pm-list > li + li { border-top: 1px solid var(--pm-hairline); }
  .pm-list > li[hidden] + li { border-top: 0; }
  .pm-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 52px; padding: 0 12px 0 16px; border: 0; background: transparent; color: var(--portal-ink); font: inherit; font-size: .98rem; font-weight: 500; text-align: left; text-decoration: none; }
  .pm-row > span { flex: 1 1 auto; min-width: 0; }
  .pm-row:active, .pm-invite:active { background-color: color-mix(in srgb, var(--portal-ink) 8%, var(--pm-group)); }
  .pm-row__chev { width: 18px; height: 18px; color: var(--portal-muted); opacity: .8; }
  .pm-row__logo { width: 22px; height: 22px; border-radius: 6px; flex: 0 0 auto; }
  .pm-row__value { flex: 0 0 auto; margin-right: 4px; font-style: normal; font-size: .9rem; color: var(--portal-muted); }
  .pm-row--danger { color: var(--portal-danger); font-weight: 600; }

  .pm-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 6px 4px 0; }
  .pm-legal a { font-size: .8rem; color: var(--portal-muted); text-decoration: none; }
  .pm-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 4px 0; font-size: .76rem; color: var(--portal-muted); }
  .pm-foot__status { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
  .pm-foot__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--portal-brand); }

  .pm-filters { display: grid; gap: 14px; }
  .pm-filters .opb-filter-field { width: 100%; max-width: none; }
  .pm-filters .portal-select, .pm-filters .opb-select { width: 100%; min-height: 48px; }

  /* ── Janelas do sistema viram folhas ───────────────────────────────── */
  /* Confirmações, convite da comunidade e conta sobem da base. A oferta de
     plano já é folha e o guia do indicador já ocupa a tela. */
  body.pm-app :is(.opb-confirm-modal, .cc-invite) .modal-dialog {
    display: flex; align-items: flex-end; width: 100%; max-width: none;
    min-height: 100%; margin: 0; padding: calc(var(--pm-safe-top) + 28px) 0 0;
  }
  body.pm-app :is(.opb-confirm-modal, .cc-invite).fade .modal-dialog { transform: translateY(48px); transition: transform .3s var(--pm-ease); }
  body.pm-app :is(.opb-confirm-modal, .cc-invite).show .modal-dialog { transform: none; }
  body.pm-app :is(.opb-confirm-modal, .cc-invite) .modal-content {
    width: 100%; max-width: none; max-height: calc(100dvh - var(--pm-safe-top) - 28px); margin: 0;
    border-radius: 22px 22px 0 0; border-left: 0; border-right: 0; border-bottom: 0;
    padding-bottom: var(--pm-safe-bottom);
  }
  body.pm-app :is(.opb-confirm-modal, .cc-invite) .btn { min-height: 48px; }

  /* Livro e certificado: a janela vira uma folha alta com a ação principal na base. */
  body.pm-app .portal-book-modal { align-items: flex-end; padding: calc(var(--pm-safe-top) + 14px) 0 0; }
  body.pm-app .portal-book-dialog { position: relative; width: 100%; max-height: 100%; border-radius: 22px 22px 0 0; border-left: 0; border-right: 0; border-bottom: 0; background: var(--pm-sheet); animation: pm-rise .3s var(--pm-ease); }
  body.pm-app .portal-book-dialog-head { flex-wrap: nowrap; align-items: center; padding: 16px var(--pm-gutter) 14px; }
  body.pm-app .portal-book-dialog-head .portal-panel-title { font-size: 1.05rem; line-height: 1.25; }
  body.pm-app .portal-book-dialog-body { padding: 16px var(--pm-gutter) calc(92px + var(--pm-safe-bottom)); }
  body.pm-app .portal-book-dialog-description { text-align: left; }
  body.pm-app .portal-book-dialog-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.pm-app .portal-book-dialog-head-actions { margin-left: auto; }
  body.pm-app .portal-book-dialog-download.btn,
  body.pm-app .portal-certificate-download-menu {
    position: absolute; left: var(--pm-gutter); right: var(--pm-gutter); bottom: calc(14px + var(--pm-safe-bottom)); z-index: 2;
  }
  body.pm-app .portal-book-dialog-download.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; border-radius: 12px; font-size: 1rem; }
  body.pm-app .portal-certificate-download-menu { width: auto; }
  body.pm-app .portal-certificate-download-menu .portal-book-dialog-download.btn { position: static; width: 100%; }
  body.pm-app .portal-certificate-download-menu .dropdown-menu { width: 100%; }
  body.pm-app .portal-book-dialog::after { content: ""; position: absolute; z-index: 1; inset: auto 0 0 0; height: calc(84px + var(--pm-safe-bottom)); background: linear-gradient(to top, var(--pm-sheet) 62%, transparent); pointer-events: none; }
  /* Certificado: Baixar na base, LinkedIn e Validar logo acima, Fechar no topo. */
  body.pm-app .portal-certificate-dialog .portal-book-dialog-body { padding-bottom: calc(150px + var(--pm-safe-bottom)); background: transparent; }
  body.pm-app .portal-certificate-dialog::after { height: calc(142px + var(--pm-safe-bottom)); }
  body.pm-app .portal-certificate-dialog-actions { flex-wrap: nowrap; }
  body.pm-app #certificateModalValidate,
  body.pm-app #certificateModalLinkedin {
    position: absolute; bottom: calc(74px + var(--pm-safe-bottom)); z-index: 2; width: calc(50% - var(--pm-gutter) - 5px);
    display: inline-flex; align-items: center; justify-content: center; min-height: 46px; border: 1px solid var(--pm-hairline); border-radius: 12px;
  }
  body.pm-app #certificateModalLinkedin { left: var(--pm-gutter); }
  body.pm-app #certificateModalValidate { right: var(--pm-gutter); }
  body.pm-app .portal-certificate-modal-meta { font-size: .82rem; }
  @keyframes pm-rise { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
  body.pm-app .portal-book-modal.is-closing .portal-book-dialog { animation: pm-lower .3s var(--pm-ease) both; }
  @keyframes pm-lower { from { transform: none; opacity: 1; } to { transform: translateY(40px); opacity: .6; } }

  /* ── Ajustes de tela ───────────────────────────────────────────────── */
  body.pm-app .portal-shell,
  body.pm-app .portal-shell.is-wide { width: 100%; max-width: none; padding: 14px var(--pm-gutter) 22px; }
  /* O título da tela já está no cabeçalho. */
  body.pm-app .portal-page-head > h1,
  body.pm-app .portal-page-head > div > h1,
  body.pm-app .indicator-breadcrumb { display: none; }
  body.pm-app .portal-page-head { margin-bottom: 14px; min-height: 0; }
  body.pm-app .portal-page-head:not(:has(> :not(h1))) { display: none; }
  body.pm-app .portal-page-head .portal-page-subtitle { margin-top: 0; }
  body.pm-app [data-pwa-connection-status] { padding-inline: var(--pm-gutter); }

  /* Avisos flutuantes sobem para cima da barra de abas. */
  body.pm-app .analytics-consent,
  body.pm-app .toast-container,
  body.pm-app .subscription-migration-notice { bottom: calc(var(--pm-tabs) + var(--pm-safe-bottom) + 12px) !important; }
  body.pm-app .portal-report-notice { bottom: calc(var(--pm-tabs) + var(--pm-safe-bottom) + 12px); }

  /* Busca fica na tela; os demais filtros moram na folha. */
  body.pm-app .portal-toolbar { display: block; width: 100%; }
  body.pm-app .portal-toolbar .opb-filter-field { width: 100%; max-width: none; }
  body.pm-app .portal-toolbar .opb-filter-field:has(.portal-search) .opb-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  body.pm-app .portal-toolbar .portal-search { width: 100%; min-height: 46px; border-radius: 12px; }
  body.pm-app .portal-toolbar .opb-filter-field:not(:has(.portal-search)) { display: none; }

  /* ── Cursos ────────────────────────────────────────────────────────── */
  body.pm-app .portal-section { margin-bottom: 26px; }
  body.pm-app .portal-section-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 4px 12px; margin-bottom: 10px; }
  body.pm-app .portal-section-title { display: block; min-width: 0; }
  body.pm-app .portal-section-title h2 { display: inline; font-size: 1.08rem; line-height: 1.25; }
  body.pm-app .portal-course-completion { margin-left: 8px; vertical-align: 1px; }
  body.pm-app .portal-section-meta { font-size: .8rem; line-height: 1.6; white-space: nowrap; }
  body.pm-app .portal-course-summary { margin: 4px 0 0; font-size: .82rem; line-height: 1.4; }
  /* O trilho vai de borda a borda e o próximo card sempre aparece pela metade. */
  body.pm-app .portal-rail-wrap { margin-inline: calc(-1 * var(--pm-gutter)); }
  body.pm-app .portal-rail {
    grid-auto-columns: min(60vw, 248px); gap: 10px;
    padding: 2px var(--pm-gutter) 4px; scroll-padding-inline: var(--pm-gutter);
    scroll-snap-type: x mandatory; scrollbar-width: none;
  }
  body.pm-app .portal-rail::-webkit-scrollbar { display: none; }
  body.pm-app .portal-lesson-card { border-radius: 12px; }
  body.pm-app .portal-lesson-body { padding: 10px 12px 11px; min-height: 0; gap: 6px; }
  body.pm-app .portal-lesson-title { font-size: .88rem; line-height: 1.3; }
  body.pm-app .portal-lesson-meta { font-size: .76rem; }
  body.pm-app .portal-section-meta[data-pm-progress] { font-size: 0; }
  body.pm-app .portal-section-meta[data-pm-progress]::after { content: attr(data-pm-progress); font-size: .8rem; }
  .pm-course-progress { display: block; height: 3px; margin: 0 0 12px; border-radius: 3px; background: color-mix(in srgb, var(--portal-ink) 12%, transparent); overflow: hidden; }
  .pm-course-progress > span { display: block; height: 100%; border-radius: 3px; background: var(--portal-brand); }

  /* Continuar assistindo: um cartão largo por vez, com o play em evidência. */
  body.pm-app #rail-continue { grid-auto-columns: min(calc(100vw - var(--pm-gutter) * 2 - 28px), 400px); }
  body.pm-app #rail-continue:has(.portal-lesson-card:only-child) { grid-auto-columns: min(calc(100vw - var(--pm-gutter) * 2), 400px); }
  body.pm-app #rail-continue .portal-lesson-title { min-height: 0; }
  body.pm-app #rail-continue .portal-lesson-body { gap: 8px; }
  body.pm-app #rail-continue .portal-thumb::after {
    content: ""; position: absolute; z-index: 3; left: 12px; bottom: 16px; width: 44px; height: 44px; border-radius: 50%;
    background: rgba(0, 0, 0, .62) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M9 6.5v11l9-5.500z'/%3E%3C/svg%3E") center / 22px no-repeat;
    border: 1px solid rgba(255, 255, 255, .28); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  }
  body.pm-app #rail-continue .portal-lesson-title { font-size: 1rem; }
  body.pm-app #rail-continue .portal-lesson-meta { font-size: .82rem; }
  body.pm-app #rail-continue .portal-card-progress { height: 4px; }

  /* ── Aula ──────────────────────────────────────────────────────────── */
  /* O vídeo fica preso no topo enquanto a lista de aulas rola por baixo. */
  body:has(.pm-shell--course) .portal-shell.is-wide { padding: 0 0 8px; }
  body:has(.pm-shell--course) .portal-page-head { display: none; }
  body:has(.pm-shell--course) .portal-player-grid { display: block; }
  body:has(.pm-shell--lesson) .portal-player-main { padding-top: var(--pm-player); }
  body:has(.pm-shell--lesson) #lessonPlayerContainer {
    position: fixed; top: calc(var(--pm-safe-top) + var(--pm-row)); left: 0; z-index: 1030;
    width: 100%; height: var(--pm-player); margin: 0; border: 0; border-radius: 0; background: #000;
    --bs-aspect-ratio: 0;
  }
  body:has(.pm-shell--lesson) #lessonPlayerContainer::before { display: none; }
  body:has(.pm-shell--lesson) .portal-player-meta { display: block; padding: 14px var(--pm-gutter) 12px; margin: 0; border: 0; background: transparent; }
  body:has(.pm-shell--lesson) .portal-player-meta .title { white-space: normal; font-size: 1.12rem; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; }
  body:has(.pm-shell--lesson) .portal-player-meta .controls { justify-content: space-between; margin-top: 10px; min-height: 32px; }
  body:has(.pm-shell--lesson) .portal-player-meta .form-check { order: 2; margin: 0 0 0 auto; padding-left: 2.6em; min-height: 0; }
  body:has(.pm-shell--lesson) .portal-player-meta .form-check-label { color: var(--portal-muted); }
  body:has(.pm-shell--lesson) #nextEpisodeBtn { display: none; }
  .pm-lesson-meta { order: 1; font-size: .84rem; color: var(--portal-muted); white-space: nowrap; }

  body:has(.pm-shell--course) .portal-curriculum { border: 0; border-top: 1px solid var(--pm-hairline); border-radius: 0; background: transparent; box-shadow: none; }
  body:has(.pm-shell--course) .portal-curriculum .portal-panel-header { padding: 14px var(--pm-gutter) 6px; min-height: 0; border: 0; background: transparent; }
  body:has(.pm-shell--course) .portal-curriculum .portal-panel-title { font-size: 1rem; }
  body:has(.pm-shell--course) .portal-curriculum .portal-section-meta { border: 0; padding: 0; background: transparent; }
  body:has(.pm-shell--course) .portal-curriculum-list { max-height: none; overflow: visible; padding: 4px 8px 8px; gap: 2px; }
  body:has(.pm-shell--course) .portal-curriculum-item { grid-template-columns: 104px minmax(0, 1fr); gap: 12px; min-height: 0; padding: 8px; border-radius: 12px; scroll-margin-top: calc(var(--pm-safe-top) + var(--pm-row) + var(--pm-player) + 12px); }
  body:has(.pm-shell--course) .portal-curriculum-item .portal-mini-thumb { width: 104px; height: auto; aspect-ratio: 16 / 9; border-radius: 8px; }
  body:has(.pm-shell--course) .portal-curriculum-item .lesson-title { font-size: .92rem; line-height: 1.3; }

  /* Sem acesso: o aviso cresce com o conteúdo e o botão de planos fica sempre visível. */
  body:has(.pm-shell--course) .portal-blocked-state { aspect-ratio: auto; min-height: var(--pm-player); margin: 0 !important; padding: 28px var(--pm-gutter); border-width: 0 0 1px; border-radius: 0; overflow: visible; }
  body:has(.pm-shell--course) .portal-blocked-state::before { display: none; }
  body:has(.pm-shell--course) .portal-blocked-state .blocked-player-overlay { position: static; padding: 0 !important; }
  body:has(.pm-shell--course) .portal-blocked-state .btn { min-height: 46px; margin-top: 6px; padding-inline: 18px; border-radius: 12px; }
  body:has(.pm-shell--course) .no-access-card { margin: var(--pm-gutter); }
  body:has(.pm-shell--course):not(:has(.pm-shell--lesson)) .portal-curriculum { border-top: 0; }

  /* Aulas e Materiais dividem o mesmo espaço quando a aula tem arquivos. */
  .pm-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; margin: 2px var(--pm-gutter) 0; padding: 3px; border: 1px solid var(--pm-hairline); border-radius: 12px; background: var(--portal-surface); }
  .pm-seg button { height: 36px; border: 0; border-radius: 9px; background: transparent; color: var(--portal-muted); font: inherit; font-size: .88rem; font-weight: 600; }
  .pm-seg button[aria-selected="true"] { background: var(--portal-ink); color: var(--portal-bg); }
  .pm-seg em { font-style: normal; font-weight: 500; opacity: .7; }
  html[data-pm-lesson-tab="materiais"] body:has(.pm-seg) .portal-curriculum,
  html:not([data-pm-lesson-tab="materiais"]) body:has(.pm-seg) .portal-shell.is-wide.pt-0 { display: none; }
  body:has(.pm-shell--lesson) .portal-shell.is-wide.pt-0 { padding: 12px var(--pm-gutter) 8px; }
  body:has(.pm-shell--lesson) .portal-shell.is-wide.pt-0 .portal-panel-header { padding: 12px 14px; min-height: 0; }
  body:has(.pm-shell--lesson) .portal-shell.is-wide.pt-0 .list-group { padding: 6px; gap: 0; }
  body:has(.pm-shell--lesson) .portal-course-material-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 8px; border: 0; border-radius: 10px; background: transparent; }
  body:has(.pm-shell--lesson) .portal-course-material-row + .portal-course-material-row { border-top: 1px solid var(--pm-hairline); border-radius: 0; }
  body:has(.pm-shell--lesson) .portal-course-material-row .portal-material-icon { width: 40px; height: 40px; margin: 0; }
  body:has(.pm-shell--lesson) .portal-course-material-row .portal-material-title { display: block; font-size: .92rem; line-height: 1.3; }
  body:has(.pm-shell--lesson) .portal-course-material-row .portal-material-title .text-truncate { display: block; white-space: normal; }
  body:has(.pm-shell--lesson) .portal-course-material-row .portal-row-meta { margin-top: 2px; }
  body:has(.pm-shell--lesson) .portal-course-material-row .portal-row-actions { grid-column: 3; grid-row: 1; width: auto; margin: 0; }
  body:has(.pm-shell--lesson) .portal-course-material-row .portal-row-actions .btn { width: auto; min-height: 40px; padding-inline: 14px; white-space: nowrap; }
  /* Baixar vira o mesmo botão redondo da tela Materiais; o rótulo continua para leitor de tela. */
  body:has(.pm-shell--lesson) .portal-course-material-row .portal-row-actions .btn-outline-primary { display: grid; place-items: center; width: 44px; height: 44px; min-height: 0; padding: 0; border-color: var(--pm-hairline); border-radius: 50%; background: transparent; color: var(--portal-ink); font-size: 0; }
  body:has(.pm-shell--lesson) .portal-course-material-row .portal-row-actions .btn-outline-primary i { margin: 0 !important; font-size: 1rem; }

  .pm-lessonbar {
    position: fixed; inset: auto 0 0 0; z-index: 1035;
    display: flex; align-items: center; gap: 14px;
    height: calc(var(--pm-tabs) + var(--pm-safe-bottom)); padding: 0 var(--pm-gutter) var(--pm-safe-bottom);
    background: color-mix(in srgb, var(--portal-bg) 96%, transparent);
    -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px);
    border-top: 1px solid var(--pm-hairline);
    view-transition-name: pm-tabs;
  }
  .pm-lessonbar__info { flex: 1 1 auto; min-width: 0; display: grid; gap: 3px; }
  .pm-lessonbar__k { display: none; }
  .pm-lessonbar__v { font-size: .82rem; color: var(--portal-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pm-lessonbar__v b { color: var(--portal-ink); font-weight: 700; }
  .pm-lessonbar__track { display: block; height: 4px; border-radius: 4px; background: color-mix(in srgb, var(--portal-ink) 14%, transparent); overflow: hidden; }
  .pm-lessonbar__track > span { display: block; height: 100%; border-radius: 4px; background: var(--portal-brand); transition: width .4s var(--pm-ease); }
  .pm-lessonbar__next { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; font-size: .95rem; font-weight: 600; }
  .pm-lessonbar__next .pm-ico { width: 18px; height: 18px; }
  .pm-lessonbar__next[hidden] { display: none; }

  /* ── Biblioteca ────────────────────────────────────────────────────── */
  body.pm-app .indicator-library-grid { gap: 14px; }
  body.pm-app .indicator-hero-clean h1 { font-size: 1.5rem; line-height: 1.2; }
  body.pm-app .indicator-markdown-body table { table-layout: fixed; }
  body.pm-app .indicator-markdown-body :is(th, td) { overflow-wrap: anywhere; }
  body.pm-app .portal-library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }

  /* ── Materiais ─────────────────────────────────────────────────────── */
  /* Lista direta por curso (materials/index.php, bloco #materialsMobile). */
  .pm-chips { display: flex; gap: 8px; margin: 0 calc(-1 * var(--pm-gutter)) 18px; padding: 0 var(--pm-gutter); overflow-x: auto; scrollbar-width: none; }
  .pm-chips::-webkit-scrollbar { display: none; }
  .pm-chip { flex: 0 0 auto; height: 34px; padding: 0 14px; border: 1px solid var(--pm-hairline); border-radius: 999px; background: transparent; color: var(--portal-muted); font: inherit; font-size: .84rem; font-weight: 600; white-space: nowrap; transition: background-color .15s, color .15s, border-color .15s; }
  .pm-chip.is-active { background: var(--portal-ink); border-color: var(--portal-ink); color: var(--portal-bg); }
  .pm-chip:focus-visible, .pm-file__action:focus-visible, .pm-file__pill:focus-visible { outline: 2px solid var(--portal-brand); outline-offset: 2px; }
  .pm-files__group { margin: 0 0 26px; }
  .pm-files__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
  .pm-files__head h2 { margin: 0; font-size: 1.08rem; font-weight: 750; line-height: 1.25; color: var(--portal-ink); }
  .pm-files__head span { flex: 0 0 auto; font-size: .8rem; color: var(--portal-muted); white-space: nowrap; }
  .pm-files__list { border: 1px solid var(--pm-hairline); border-radius: 16px; background: var(--portal-surface); overflow: hidden; }
  .pm-file { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; }
  .pm-file + .pm-file { border-top: 1px solid var(--pm-hairline); }
  .pm-file.d-none + .pm-file, .pm-files__list > .pm-file:not(.d-none) { border-top-color: var(--pm-hairline); }
  .pm-file__type { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--portal-surface-2); font-size: .66rem; font-weight: 800; letter-spacing: .04em; color: var(--portal-ink); }
  .pm-file__text { min-width: 0; }
  .pm-file__title { margin: 0; font-size: .95rem; font-weight: 650; line-height: 1.3; color: var(--portal-ink); overflow-wrap: anywhere; }
  .pm-file__meta { margin: 2px 0 0; font-size: .8rem; line-height: 1.35; color: var(--portal-muted); overflow-wrap: anywhere; }
  .pm-file__action { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--pm-hairline); border-radius: 50%; background: transparent; color: var(--portal-ink); }
  .pm-file__action svg { width: 20px; height: 20px; }
  .pm-file__action:active { background: color-mix(in srgb, var(--portal-ink) 10%, transparent); }
  .pm-file__action.is-locked { color: var(--portal-muted); }
  .pm-file__pill { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border: 1px solid var(--pm-hairline); border-radius: 999px; font-size: .8rem; font-weight: 650; color: var(--portal-ink); text-decoration: none; white-space: nowrap; }
  .pm-file__pill.is-muted { border: 0; padding: 0; font-weight: 500; color: var(--portal-muted); white-space: normal; max-width: 110px; text-align: right; }

  /* ── Bug e feedback: página inteira, como no app do Diário ───────────
     O formulário traz regras próprias em <style> depois desta folha, algumas com
     !important. O prefixo "html" e os !important abaixo garantem a casca no celular. */
  html body.pm-app :is(#nativeBugModal, #nativeFeedbackModal) { --pm-go: linear-gradient(135deg, #00c978 0%, #009157 100%); --pm-go-ink: #001b10; }
  html body.pm-app :is(#nativeBugModal, #nativeFeedbackModal) .modal-dialog { display: flex; align-items: stretch; width: 100%; max-width: none !important; height: 100%; min-height: 100% !important; margin: 0 !important; }
  html body.pm-app :is(#nativeBugModal, #nativeFeedbackModal).fade .modal-dialog { transform: translateX(40px); transition: transform .3s var(--pm-ease); }
  html body.pm-app :is(#nativeBugModal, #nativeFeedbackModal).show .modal-dialog { transform: none; }
  html body.pm-app :is(#nativeBugModal, #nativeFeedbackModal) .modal-content { display: flex; flex-direction: column; width: 100%; height: 100dvh !important; max-height: none !important; padding-top: var(--pm-safe-top); border: 0 !important; border-radius: 0 !important; background: var(--portal-bg) !important; box-shadow: none; overflow: hidden; }
  html body.pm-app :is(#nativeBugModal, #nativeFeedbackModal) form { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; margin: 0; }
  html body.pm-app :is(#nativeBugModal, #nativeFeedbackModal) .modal-header { flex: 0 0 auto; align-items: center; padding: 12px var(--pm-gutter) 6px !important; border: 0; }
  html body.pm-app :is(#nativeBugModal, #nativeFeedbackModal) .modal-title { display: flex; align-items: center; gap: 10px; font-size: 1.06rem !important; font-weight: 700; line-height: 1.3; color: var(--portal-ink); }
  html body.pm-app :is(#nativeBugModal, #nativeFeedbackModal) .modal-title i { margin: 0 10px 0 0 !important; font-size: 1.15rem; color: var(--portal-brand); }
  html body.pm-app :is(#nativeBugModal, #nativeFeedbackModal) .btn-close { width: 40px; height: 40px; margin: 0; padding: 0; border: 1px solid var(--pm-hairline); border-radius: 14px; background-size: 13px; opacity: 1 !important; }
  html.all-black body.pm-app :is(#nativeBugModal, #nativeFeedbackModal) .btn-close { filter: invert(1) grayscale(1) brightness(2) !important; border-color: #d5d5d5; }
  html body.pm-app :is(#nativeBugModal, #nativeFeedbackModal) .modal-body { flex: 1 1 auto; min-height: 0; padding: 10px var(--pm-gutter) 16px !important; overflow-y: auto; overscroll-behavior: contain; }
  html body.pm-app :is(#nativeBugModal, #nativeFeedbackModal) .modal-footer { flex: 0 0 auto; display: flex; flex-wrap: nowrap; justify-content: stretch; gap: 10px !important; margin: 0; padding: 12px var(--pm-gutter) calc(16px + var(--pm-safe-bottom)) !important; border-top: 1px solid var(--pm-hairline); background: var(--portal-bg); }
  html body.pm-app :is(#nativeBugModal, #nativeFeedbackModal) .modal-content .modal-footer .btn { flex: 2 1 0; min-height: 52px !important; margin: 0; padding: 0 14px !important; border: 0; border-radius: 16px !important; background: var(--pm-go) !important; color: var(--pm-go-ink) !important; font-size: 1rem !important; font-weight: 650 !important; line-height: 1 !important; }
  html body.pm-app :is(#nativeBugModal, #nativeFeedbackModal) .modal-content .modal-footer .btn:is(.btn-secondary, .btn-outline-secondary) { flex: 1 1 0; border: 1px solid var(--pm-hairline); background: transparent !important; color: var(--portal-ink) !important; }
  html body.pm-app :is(#nativeBugModal, #nativeFeedbackModal) .modal-footer .btn[hidden] { display: none; }
  html body.pm-app :is(#nativeBugModal, #nativeFeedbackModal) .modal-content .modal-footer .btn:disabled:not(.btn-secondary):not(.btn-outline-secondary) { background: var(--portal-surface-2) !important; color: var(--portal-muted) !important; opacity: 1; }
  html body.pm-app :is(#nativeBugModal, #nativeFeedbackModal) .form-label { font-size: .95rem !important; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--portal-ink); }
  html body.pm-app :is(#nativeBugModal, #nativeFeedbackModal) .form-control { padding: 14px 16px; border-radius: 16px !important; background-color: var(--portal-surface); font-size: 1rem; }
  html body.pm-app :is(#nativeBugModal, #nativeFeedbackModal) textarea.form-control { height: auto !important; min-height: 132px !important; resize: none; }
  html body.pm-app :is(#nativeBugModal, #nativeFeedbackModal) .alert { border-radius: 16px; font-size: .9rem; }
  html body.pm-app #nativeBugModal .form-text { font-size: .82rem; line-height: 1.45; color: var(--portal-muted); }

  html body.pm-app #nativeFeedbackModal .feedback-progress { margin-bottom: 26px !important; }
  html body.pm-app #nativeFeedbackModal .feedback-progress-title { font-size: .82rem !important; font-weight: 600 !important; color: var(--portal-muted) !important; }
  html body.pm-app #nativeFeedbackModal .feedback-progress-count { font-size: .82rem !important; font-weight: 600 !important; font-variant-numeric: tabular-nums; color: var(--portal-ink) !important; }
  /* Seis segmentos, um por etapa: os pontos viram as barras e as linhas saem. */
  html body.pm-app #nativeFeedbackModal .feedback-steps-indicator { gap: 4px; }
  html body.pm-app #nativeFeedbackModal .feedback-steps-indicator .step-line { display: none; }
  html body.pm-app #nativeFeedbackModal .feedback-steps-indicator .step-dot { flex: 1 1 0; width: auto; height: 4px; border-radius: 999px; background: color-mix(in srgb, var(--portal-ink) 14%, transparent); box-shadow: none; transform: none; }
  html body.pm-app #nativeFeedbackModal .feedback-steps-indicator .step-dot:is(.active, .completed) { background: #00a765; }
  html body.pm-app #nativeFeedbackModal .feedback-step:not(.d-none) { animation: pm-step-in .28s var(--pm-ease); }
  @keyframes pm-step-in { from { opacity: 0; transform: translateX(18px); } }
  html body.pm-app #nativeFeedbackModal #feedbackStep1 > div { display: flex; flex-direction: column; justify-content: center; min-height: 52dvh; padding: 0 !important; }
  html body.pm-app #nativeFeedbackModal #feedbackStep1 .form-label { margin: 0 0 26px !important; font-size: 1.5rem !important; font-weight: 750; line-height: 1.25; letter-spacing: -.01em; }
  html body.pm-app #nativeFeedbackModal .star-rating { gap: 6px !important; margin: 0; }
  html body.pm-app #nativeFeedbackModal .feedback-star-button { display: grid; place-items: center; width: 56px; height: 56px; padding: 0; border: 0; border-radius: 16px; background: transparent; transition: transform .12s ease; }
  html body.pm-app #nativeFeedbackModal .feedback-star-button:active { transform: scale(.88); }
  html body.pm-app #nativeFeedbackModal .star-icon { width: 40px; height: 40px; }
  html body.pm-app #nativeFeedbackModal .feedback-step-title { margin: 0 0 6px; font-size: 1.38rem; font-weight: 750; line-height: 1.25; letter-spacing: -.01em; color: var(--portal-ink); }
  html body.pm-app #nativeFeedbackModal .feedback-step-subtitle { margin: 0 0 20px; font-size: .95rem; color: var(--portal-muted); }
  html body.pm-app #nativeFeedbackModal .feedback-checkbox-grid { grid-template-columns: 1fr; gap: 8px; }
  html body.pm-app #nativeFeedbackModal .feedback-checkbox-grid .form-check { position: relative; min-height: 52px; margin: 0; padding: 0; border: 1px solid var(--pm-hairline); border-radius: 16px; background: var(--portal-surface); }
  html body.pm-app #nativeFeedbackModal .feedback-checkbox-grid .form-check:has(.form-check-input:checked) { border-color: #00a765; background: color-mix(in srgb, #00a765 10%, var(--portal-surface)); }
  html body.pm-app #nativeFeedbackModal .feedback-checkbox-grid .form-check-input { position: absolute; top: 50%; left: 14px; float: none; width: 22px; height: 22px; margin: -11px 0 0; border: 1.5px solid var(--portal-muted); border-radius: 7px; background-color: transparent; box-shadow: none; pointer-events: none; }
  html body.pm-app #nativeFeedbackModal .feedback-checkbox-grid .form-check-input:checked { border-color: #00a765; background-color: #00a765; }
  html body.pm-app #nativeFeedbackModal .feedback-checkbox-grid .form-check-label { display: flex; align-items: center; min-height: 50px; padding: 8px 14px 8px 48px; font-size: .95rem; font-weight: 500; line-height: 1.3; color: var(--portal-ink); }
  html body.pm-app #nativeFeedbackModal .feedback-checkbox-grid + *, html body.pm-app #nativeFeedbackModal .feedback-step > .mb-3 + .mb-3 { margin-top: 22px; }

}

@media (max-width: 991.98px) and (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .pm-sheet, .pm-sheet::backdrop, .pm-tab__ico, .pm-lessonbar__track > span, .pm-skeleton, .pm-chip,
  body.pm-app .modal.fade .modal-dialog { transition: none !important; }
  body.pm-app .portal-book-dialog, body.pm-app #nativeFeedbackModal .feedback-step { animation: none !important; }
}
