/* EllGab Modern v1.0.27 — mobile discussion readability and controls.
   Additive, discussion-scoped CSS only; keep v1.0.26 author cards intact.
   No changes to Classic, SMF editor JS, posting actions, or mod permissions. */
@media screen and (max-width: 700px) {
  #forumposts { min-width: 0; max-width: 100%; }
  #forumposts .post_wrapper,
  #forumposts .post_wrapper > .postarea,
  #forumposts .post_wrapper > .moderatorbar,
  #forumposts .postarea .post,
  #forumposts .postarea .inner {
    box-sizing: border-box;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  #forumposts .post_wrapper > .postarea {
    padding: 11px 12px 13px !important;
  }
  #forumposts .postarea .flow_hidden {
    width: 100% !important;
    min-width: 0 !important;
    overflow: visible;
  }
  #forumposts .postarea .keyinfo {
    display: block !important;
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 0 5px !important;
    padding: 0 !important;
  }
  #forumposts .postarea .keyinfo h5 {
    min-width: 0;
    max-width: 100%;
    margin: 0 0 3px;
    font-size: .97rem;
    line-height: 1.38;
    overflow-wrap: anywhere;
  }
  #forumposts .postarea .keyinfo .smalltext {
    font-size: .78rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }
  #forumposts .postarea .messageicon { margin-right: 6px; }
  #forumposts .postarea .inner {
    padding: 11px 0 8px !important;
    font-size: 1rem !important;
    line-height: 1.62 !important;
    overflow-wrap: anywhere;
    word-break: normal;
  }
  #forumposts .postarea .inner img,
  #forumposts .postarea .inner video,
  #forumposts .postarea .inner iframe,
  #forumposts .postarea .inner object,
  #forumposts .postarea .inner embed,
  #forumposts .postarea .signature img,
  #forumposts .postarea .attachments img {
    max-width: 100% !important;
    height: auto;
    box-sizing: border-box;
  }
  #forumposts .postarea .inner iframe,
  #forumposts .postarea .inner embed,
  #forumposts .postarea .inner object { max-height: 75vh; }
  #forumposts .postarea .inner pre,
  #forumposts .postarea .inner .bbc_code,
  #forumposts .postarea .inner code.bbc_code {
    box-sizing: border-box;
    width: auto;
    max-width: 100% !important;
    overflow-x: auto !important;
    white-space: pre;
    -webkit-overflow-scrolling: touch;
  }
  #forumposts .postarea .inner blockquote,
  #forumposts .postarea .inner .bbc_quote {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100% !important;
    margin: 8px 0 !important;
    padding: 9px 11px !important;
    border-radius: 7px;
    overflow-wrap: anywhere;
  }
  #forumposts .postarea .inner blockquote blockquote { margin: 7px 0 !important; }
  #forumposts .postarea .inner table { max-width: 100%; }
  #forumposts .postarea .inner .quoteheader,
  #forumposts .postarea .inner .codeheader { font-size: .83rem; line-height: 1.4; }
  #forumposts .postarea ul.quickbuttons {
    float: none !important;
    clear: both !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 8px 0 3px !important;
    padding: 0 !important;
  }
  #forumposts .postarea ul.quickbuttons li {
    float: none !important;
    flex: 0 0 auto;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  #forumposts .postarea ul.quickbuttons li a {
    box-sizing: border-box;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 11px !important;
    line-height: 1.2;
    font-size: .82rem;
  }
  #forumposts .moderatorbar {
    padding: 9px 12px 12px !important;
    overflow-wrap: anywhere;
  }
  #forumposts .postarea .attachments {
    max-width: 100% !important;
    overflow-x: auto !important;
    padding: 9px 0;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }
  #forumposts .postarea .signature,
  #forumposts .postarea .custom_fields_above_signature {
    box-sizing: border-box;
    max-width: 100%;
    margin-top: 12px;
    padding-top: 10px;
    overflow-wrap: anywhere;
  }
  #forumposts #whoisviewing {
    color: #b6c3d0 !important;
    font-size: .78rem;
    line-height: 1.45;
    padding: 4px 10px;
    overflow-wrap: anywhere;
  }
  .pagesection {
    box-sizing: border-box;
    max-width: 100%;
    gap: 8px !important;
  }
  .pagesection .pagelinks,
  .pagesection .nextlinks { max-width: 100%; overflow-wrap: anywhere; }
  .pagesection .pagelinks a,
  .pagesection .pagelinks strong {
    display: inline-block;
    margin: 2px 1px;
    padding: 7px 9px;
    min-height: 34px;
    box-sizing: border-box;
  }
}
@media screen and (max-width: 360px) {
  #forumposts .post_wrapper > .postarea { padding: 9px 8px 12px !important; }
  #forumposts .postarea ul.quickbuttons li a { min-height: 36px; padding: 7px 9px !important; }
  #forumposts .postarea .inner { font-size: .96rem !important; }
}
