/* The consumer mobile palette wins over the Community stylesheet loaded by the route. */
@media (max-width: 760px) {
  body[data-mobile-app="true"] .community {
    --lime: var(--mobile-primary);
    --casca: var(--mobile-surface);
    --tecla: var(--mobile-raised);
    --tecla-h: var(--mobile-selected);
    --acesa: var(--mobile-selected);
    --sh-tecla: none;
    --sh-acesa: none;
    --sh-poco: none;
    --sh-modulo: none;
    --sh-midia: none;
    --sh-escolha: none;
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: auto;
    margin: 0;
    background: none;
    color: var(--mobile-text);
    font: 400 1rem/1.45 var(--mobile-font);
    overflow: visible;
  }
  body[data-mobile-app="true"] .community .cm-page {
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
  }
  body[data-mobile-app="true"] .community .cm-main-b { width: 100%; min-width: 0; }
  body[data-mobile-app="true"] .community .cm-head {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 0 0 20px;
  }
  body[data-mobile-app="true"] .community .cm-head-l { width: 100%; min-width: 0; gap: 12px; }
  body[data-mobile-app="true"] .community .cm-head-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    min-width: 0;
  }
  body[data-mobile-app="true"] .community .cm-title {
    margin: 0;
    color: var(--mobile-text);
    font: 700 2.125rem/1.09 var(--mobile-display);
    letter-spacing: -.025em;
    overflow-wrap: anywhere;
  }
  body[data-mobile-app="true"] .community .cm-title span { color: var(--mobile-muted); }
  body[data-mobile-app="true"] .community .cm-head-r { align-items: stretch; width: 100%; min-height: 0; }
  body[data-mobile-app="true"] .community .cm-head-r > :is(a, button) { flex: 1; }
  body[data-mobile-app="true"] .community .cm-crumb { flex-wrap: wrap; color: var(--mobile-muted); font-size: .875rem; line-height: 1.4; }
  body[data-mobile-app="true"] .community .cm-crumb :is(a, b) { color: var(--mobile-accent); }

  body[data-mobile-app="true"] .community .cm-tabs {
    display: grid;
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    overflow: visible;
  }
  body[data-mobile-app="true"] .community .cm-tabs:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
  body[data-mobile-app="true"] .community .cm-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    min-height: 48px;
    height: auto;
    padding: 12px 10px;
    border: 0;
    border-radius: 16px;
    background: var(--mobile-surface);
    color: var(--mobile-text);
    font: 600 1rem/1.3 var(--mobile-font);
    text-align: center;
    white-space: normal;
    text-decoration: none;
    box-shadow: none;
  }
  body[data-mobile-app="true"] .community .cm-tab :is(svg, .icon) { flex: 0 0 20px; width: 20px; height: 20px; }
  body[data-mobile-app="true"] .community :is(.cm-tab.on, .cm-tab[aria-current="page"]) { background: var(--mobile-lilac); color: var(--mobile-ink); box-shadow: none; }
  body[data-mobile-app="true"] .community .cm-tab:hover { color: var(--mobile-text); }
  body[data-mobile-app="true"] .community :is(.cm-tab.on, .cm-tab[aria-current="page"]):hover { color: var(--mobile-ink); }

  body[data-mobile-app="true"] .community :is(.key, .seg-b, .cm-chip, .cm-link, .cm-act, .cm-open) {
    min-width: 48px;
    min-height: 48px;
    height: auto;
    padding: 12px 14px;
    border: 0;
    border-radius: 16px;
    background: var(--mobile-raised);
    color: var(--mobile-text);
    font: 600 1rem/1.4 var(--mobile-font);
    white-space: normal;
    text-decoration: none;
    box-shadow: none;
    filter: none;
  }
  body[data-mobile-app="true"] .community :is(.key, .seg-b, .cm-chip):hover { background: var(--mobile-selected); color: var(--mobile-text); box-shadow: none; }
  body[data-mobile-app="true"] .community :is(.seg-b.on, .cm-chip.on) { background: var(--mobile-lilac); color: var(--mobile-ink); box-shadow: none; }
  body[data-mobile-app="true"] .community :is(.seg-b.on, .cm-chip.on):hover { color: var(--mobile-ink); }
  body[data-mobile-app="true"] .community .cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 48px;
    min-height: 56px;
    height: auto;
    padding: 14px 18px;
    border: 0;
    border-radius: 16px;
    background: var(--mobile-primary);
    color: var(--mobile-on-primary);
    font: 600 1rem/1.4 var(--mobile-font);
    white-space: normal;
    text-align: center;
    text-decoration: none;
    box-shadow: none;
    filter: none;
  }
  body[data-mobile-app="true"] .community .cta:hover { color: var(--mobile-on-primary); filter: none; box-shadow: none; }
  body[data-mobile-app="true"] .community .cta.is-quiet { background: var(--mobile-raised); color: var(--mobile-text); }
  body[data-mobile-app="true"] .community .cta.danger { background: var(--mobile-danger); color: var(--mobile-ink); }
  body[data-mobile-app="true"] .community .cta.is-busy { background: var(--mobile-primary); animation: none; }
  body[data-mobile-app="true"] .community :is(.cta, .key, .seg-b, .cm-chip):active { box-shadow: none; }
  body[data-mobile-app="true"] .community :is(.cta.off, .key.dim, [aria-disabled="true"], button:disabled) { opacity: .45; filter: none; cursor: default; }
  body[data-mobile-app="true"] .community .round { width: 48px; height: 48px; padding: 0; }

  body[data-mobile-app="true"] .community .cm-state {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    min-width: 0;
    padding: 20px;
    border: 0;
    border-radius: 16px;
    background: var(--mobile-surface);
    color: var(--mobile-text);
    text-align: start;
    box-shadow: none;
  }
  body[data-mobile-app="true"] .community .cm-state-ic { width: 52px; height: 52px; border-radius: 16px; background: var(--mobile-lilac); color: var(--mobile-ink); box-shadow: none; }
  body[data-mobile-app="true"] .community .cm-state-ic.err { background: var(--mobile-danger); color: var(--mobile-ink); }
  body[data-mobile-app="true"] .community .cm-state h3 { margin: 0; color: var(--mobile-text); font: 700 1.5rem/1.15 var(--mobile-display); letter-spacing: -.025em; }
  body[data-mobile-app="true"] .community .cm-state p { max-width: none; margin: 0; color: var(--mobile-muted); font: 400 1rem/1.45 var(--mobile-font); }
  body[data-mobile-app="true"] .community .cm-state .acts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; width: 100%; margin: 0; }
  body[data-mobile-app="true"] .community .cm-state .acts > :is(a, button) { width: 100%; }

  body[data-mobile-app="true"] .community :is(.shell, .cm-card, .cm-post, .cm-course, .cm-newc, .cm-pcard, .cm-write) { background: var(--mobile-surface); color: var(--mobile-text); box-shadow: none; }
  body[data-mobile-app="true"] .community :is(.shell, .frame)::before,
  body[data-mobile-app="true"] .community :is(.shell, .frame)::after { content: none; }
  body[data-mobile-app="true"] .community .dots { display: none; }
  body[data-mobile-app="true"] .community .frame { background: var(--mobile-raised); box-shadow: none; }
  body[data-mobile-app="true"] .community :is(.cm-body, .cm-ltext) { color: var(--mobile-text); font: 400 1rem/1.55 var(--mobile-font); }
  body[data-mobile-app="true"] .community :is(.cm-name, .cm-lb-n, .cm-lside h2, .cm-lmain h1, .cm-dialog h2, .cm-cbody b, .cm-sw-t b, .cm-gt b, .cm-art-t, .cm-ltext strong) { color: var(--mobile-text); }
  body[data-mobile-app="true"] .community :is(.cm-name:hover, .cm-link:hover, a.cm-lli:hover) { color: var(--mobile-accent); }
  body[data-mobile-app="true"] .community :is(.note-s, .cm-hint, .cm-intro, .cm-flabel small, .cm-cby, .cm-cprog, .cm-lli small, .cm-sw-t small, .cm-gt small) { color: var(--mobile-muted); font: 400 .875rem/1.45 var(--mobile-font); }
  body[data-mobile-app="true"] .community :is(.cm-hint.err, .cm-hint.warn, .cm-hint.ok) { color: var(--mobile-text); }
  body[data-mobile-app="true"] .community .cm-flabel { color: var(--mobile-muted); font: 600 .875rem/1.4 var(--mobile-font); }
  body[data-mobile-app="true"] .community :is(.cm-check, .cm-radios label) { min-height: 48px; color: var(--mobile-text); font: 400 1rem/1.45 var(--mobile-font); }
  body[data-mobile-app="true"] .community .cm-radios label { background: var(--mobile-raised); box-shadow: none; }
  body[data-mobile-app="true"] .community :is(.cm-in, .cm-ta, .cm-search input) {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 56px;
    height: auto;
    padding: 14px 16px;
    border: 1px solid var(--mobile-control-border);
    border-radius: 16px;
    background: var(--mobile-raised);
    color: var(--mobile-text);
    font: 400 1rem/1.45 var(--mobile-font);
    box-shadow: none;
  }
  body[data-mobile-app="true"] .community .cm-ta { min-height: 120px; resize: vertical; }
  body[data-mobile-app="true"] .community :is(.cm-in, .cm-ta, .cm-search input)::placeholder { color: var(--mobile-muted); opacity: 1; }
  body[data-mobile-app="true"] .community .cm-search { width: 100%; min-width: 0; }
  body[data-mobile-app="true"] .community .cm-search input { padding-left: 44px; }
  body[data-mobile-app="true"] .community .cm-search svg { left: 14px; width: 20px; height: 20px; color: var(--mobile-accent); }
  body[data-mobile-app="true"] .community .cm-pre { background: var(--mobile-raised); border: 1px solid var(--mobile-control-border); border-radius: 16px; box-shadow: none; }
  body[data-mobile-app="true"] .community .cm-pre input { min-height: 56px; border: 0; color: var(--mobile-text); font: 400 1rem/1.45 var(--mobile-font); }
  body[data-mobile-app="true"] .community .cm-pre:focus-within { outline: 2px solid var(--mobile-focus); outline-offset: 3px; box-shadow: none; }
  body[data-mobile-app="true"] .community :is(input, select, textarea, button, a):focus-visible { outline: 2px solid var(--mobile-focus); outline-offset: 3px; box-shadow: none; }
  body[data-mobile-app="true"] .community :is(.cm-check, .cm-radios) input { width: 24px; height: 24px; min-height: 24px; flex: 0 0 24px; accent-color: var(--mobile-accent); }

  body[data-mobile-app="true"] .community .cm-filters { display: flex; flex-direction: column; align-items: stretch; gap: 12px; margin: 0 0 20px; }
  body[data-mobile-app="true"] .community .seg { width: 100%; padding: 0; gap: 8px; background: none; box-shadow: none; }
  /* Academy writes the number of filter columns inline; two columns keep every option visible. */
  body[data-mobile-app="true"] .community .cm-filters > .seg:has(> :nth-child(2)) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  body[data-mobile-app="true"] .community .cm-chips { flex-wrap: wrap; gap: 8px; }
  body[data-mobile-app="true"] .community .count { min-height: 22px; height: auto; background: var(--mobile-raised); color: var(--mobile-muted); font: 600 .8125rem/1.3 var(--mobile-font); box-shadow: none; }
  body[data-mobile-app="true"] .community .cm-tab .cm-alert { height: 22px; min-width: 22px; background: var(--mobile-lime); color: var(--mobile-ink); font-size: .8125rem; box-shadow: none; }
  body[data-mobile-app="true"] .community :is(.cm-cgrid, .cm-lesson, .cm-cc) { grid-template-columns: minmax(0, 1fr); gap: 20px; min-width: 0; }
  body[data-mobile-app="true"] .community .cm-course { border-radius: 16px; }
  body[data-mobile-app="true"] .community .cm-course:hover { box-shadow: none; transform: none; }
  body[data-mobile-app="true"] .community .cm-course:hover .cm-ccov img { transform: none; }
  body[data-mobile-app="true"] .community .cm-ccov { background: var(--mobile-raised); }
  body[data-mobile-app="true"] .community .cm-cbody { gap: 10px; padding: 16px; }
  body[data-mobile-app="true"] .community .cm-cbody b { font: 700 1.375rem/1.2 var(--mobile-display); letter-spacing: -.025em; }
  body[data-mobile-app="true"] .community .cm-cbody .p { color: var(--mobile-muted); font: 400 1rem/1.45 var(--mobile-font); }
  body[data-mobile-app="true"] .community :is(.badge-free, .badge-sub, .badge-wait, .badge-pin) { min-height: 24px; height: auto; padding: 4px 8px; border-radius: 8px; background: var(--mobile-lilac); color: var(--mobile-ink); font: 600 .8125rem/1.3 var(--mobile-font); letter-spacing: 0; box-shadow: none; }
  body[data-mobile-app="true"] .community .glass { min-height: 24px; height: auto; background: rgba(10, 10, 11, .82); color: var(--mobile-on-media); font-size: .8125rem; line-height: 1.3; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
  body[data-mobile-app="true"] .community .cm-newc { min-height: 190px; padding: 20px; }
  body[data-mobile-app="true"] .community .cm-newc span { background: var(--mobile-lilac); color: var(--mobile-ink); box-shadow: none; }
  body[data-mobile-app="true"] .community .cm-newc small { color: var(--mobile-muted); font: 400 .875rem/1.45 var(--mobile-font); }
  body[data-mobile-app="true"] .community .cm-lside { position: static; padding: 16px; }
  body[data-mobile-app="true"] .community .cm-lmain { min-width: 0; padding: 0; background: none; }
  body[data-mobile-app="true"] .community .cm-lmain h1 { color: var(--mobile-text); font: 700 1.75rem/1.15 var(--mobile-display); letter-spacing: -.025em; }
  body[data-mobile-app="true"] .community .cm-lstage { width: 100%; height: auto; min-height: 0; aspect-ratio: 16 / 9; background: var(--mobile-raised); box-shadow: none; }
  body[data-mobile-app="true"] .community .cm-ltext :is(h2, h3, h4) { color: var(--mobile-text); font-family: var(--mobile-display); }
  body[data-mobile-app="true"] .community .cm-ltext :is(code, blockquote) { background: var(--mobile-raised); color: var(--mobile-text); box-shadow: none; }
  body[data-mobile-app="true"] .community .cm-ltext :is(a, strong) { color: var(--mobile-accent); }
  body[data-mobile-app="true"] .community .cm-ltext hr { background: var(--mobile-line); }
  body[data-mobile-app="true"] .community .cm-lli { min-height: 64px; color: var(--mobile-text); }
  body[data-mobile-app="true"] .community .cm-lli.on { background: var(--mobile-selected); color: var(--mobile-text); box-shadow: none; }
  body[data-mobile-app="true"] .community .cm-lli b { font: 600 1rem/1.4 var(--mobile-font); }
  body[data-mobile-app="true"] .community .cm-bar { background: var(--mobile-raised); box-shadow: none; }
  body[data-mobile-app="true"] .community .cm-bar i { background: var(--mobile-accent); box-shadow: none; }
}
@media (max-width: 760px) {
  body[data-mobile-app="true"] .community :is(.cm-mention, .cm-check a) { color: var(--mobile-accent); }
}
