/* CYBERMUSE shared mobile responsiveness improvements. */
@media (max-width: 768px) {
  html, body { max-width: 100%; overflow-x: hidden; }
  body { -webkit-text-size-adjust: 100%; }
  *, *::before, *::after { box-sizing: border-box; }

  img, video, canvas, svg, iframe { max-width: 100%; }
  img, video { height: auto; }

  main, section, article, .wrap, .container, .page, .content,
  .feedPage, .accountPage, .fcWrap, .sub {
    max-width: 100% !important;
  }

  .wrap, .container, .page, .content, .feedPage, .accountPage, .fcWrap, .sub {
    width: 100% !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  h1 { font-size: clamp(1.65rem, 8vw, 2.6rem) !important; line-height: 1.08; overflow-wrap: anywhere; }
  h2 { font-size: clamp(1.25rem, 6vw, 1.8rem); line-height: 1.18; overflow-wrap: anywhere; }
  h3 { overflow-wrap: anywhere; }
  p, a, button, input, select, textarea, label { overflow-wrap: anywhere; }

  input, select, textarea, button {
    max-width: 100%;
    min-height: 44px;
    font-size: 16px !important;
  }
  textarea { min-height: 96px; }

  .grid, .formGrid, .statsGrid, .cards, .cardGrid, .profileGrid,
  .plans, .countries, .stk, .photoGrid {
    grid-template-columns: 1fr !important;
  }

  .actions, .buttons, .buttonRow, .top, .head, .heroActions {
    flex-wrap: wrap !important;
  }
  .actions > button, .actions > a, .buttons > button, .buttons > a,
  .buttonRow > button, .buttonRow > a {
    max-width: 100%;
  }

  nav, .nav, .tabs, .topNav, .bottomNav, .menuBar {
    max-width: 100%;
  }
  .tabs {
    overflow-x: auto;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .tabs > * { flex: 0 0 auto; }

  table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  pre, code { max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; }

  .modal, [class*="modal" i] { max-width: 100vw; }
  .modal-content, .modalContent, [class*="modal-card" i], [class*="modalCard" i] {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    max-height: 88vh;
    overflow-y: auto;
  }

  .card, [class*="card" i] { max-width: 100%; }
  .bal, .money { font-size: clamp(1.8rem, 10vw, 2.6rem) !important; }

  .sourceRow, .sourceTotal { align-items: flex-start; }
  .sourceRow strong, .sourceTotal strong { white-space: normal !important; text-align: right; }

  .createdRow { min-width: 0; }
  .createdRow > * { min-width: 0; }

  .hero { min-width: 0; }
  .hero > div { min-width: 0; }

  /* Prevent fixed/bottom controls from extending beyond small screens. */
  [style*="position:fixed"], [style*="position: fixed"] { max-width: 100vw; }
}

@media (max-width: 480px) {
  .wrap, .container, .page, .content, .feedPage, .accountPage, .fcWrap, .sub {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  .card, [class*="card" i], .panel { padding-left: 12px !important; padding-right: 12px !important; }
  .top { padding-left: 10px !important; padding-right: 10px !important; align-items: flex-start !important; }
  .top > div { max-width: 100%; }
  .avatar { width: 68px !important; height: 68px !important; flex: 0 0 68px; }
  .sourceRow, .sourceTotal { gap: 8px; }
}
