/* Mobile RMVOZ presentation, adapted from the original max-640px.css.
   Keep the more readable SMF 2.1 topic list and all native form controls. */
@media (max-width: 700px) {
  /* The original full-width search also keeps its button reachable at 360px. */
  .rmvoz-legacy #upper_section_in { display: flex; flex-wrap: wrap; }
  .rmvoz-legacy #upper_section.rmvoz-userbar .news { order: 0; flex: 0 0 100%; box-sizing: border-box; width: 100%; }
  .rmvoz-legacy #upper_section.rmvoz-userbar .news #search_form { flex-wrap: wrap; justify-content: flex-start; }
  .rmvoz-legacy .rmvoz-search input[type=search] { flex: 1 1 100%; width: 100%; min-width: 0; }
  .rmvoz-legacy .rmvoz-guest { order: 1; width: 100%; }
  .rmvoz-auth-legacy ul.rmvoz-home-account { order: 2; flex: 1 1 170px; min-width: 0; }
  .rmvoz-legacy #upper_section_in > p { order: 3; width: 100%; }
  /* A single readable column for the seven recent topics, as on SMF 2.0. */
  .rmvoz-home-view #info_center .ssi_table { table-layout: auto; }
  .rmvoz-home-view #info_center .ssi_table tr > :not(:nth-child(2)) { display: none; }
  .rmvoz-home-view #info_center .ssi_table tr > :nth-child(2) {
    display: table-cell;
    width: 100%;
    overflow-wrap: break-word;
    word-break: normal;
  }

  /* Restore the original type size and generous targets for child boards. */
  .rmvoz-home-view #boardindex_table .rmvoz-boards td.children a,
  .rmvoz-forum-view .rmvoz-childboard-table td.children a {
    display: inline;
    padding: 6px;
    font-size: 17.28px;
    line-height: 30px;
  }
  .rmvoz-home-view #boardindex_table .rmvoz-boards td.lastpost,
  .rmvoz-forum-view .rmvoz-childboard-table td.lastpost { font-size: 16px; overflow-wrap: break-word; }

  /* Retain avatars without exposing the rest of the desktop author sidebar. */
  .rmvoz-forum-view #forumposts .poster ul.user_info,
  .rmvoz-aux-view #personal_messages .poster ul.user_info { display: block; margin: 0 13.6px 0 20.4px; }
  .rmvoz-legacy .poster ul.user_info > li::before { content: none; padding: 0; }
  .rmvoz-forum-view #forumposts .poster ul.user_info > :not(.avatar):not(.warning),
  .rmvoz-aux-view #personal_messages .poster ul.user_info > :not(.avatar):not(.warning) { display: none; }
  .rmvoz-forum-view #forumposts .poster ul.user_info > .avatar,
  .rmvoz-aux-view #personal_messages .poster ul.user_info > .avatar { display: block; margin: 8px 0 0; }
  .rmvoz-forum-view #forumposts .poster img.avatar,
  .rmvoz-aux-view #personal_messages .poster img.avatar { display: block; max-width: 100px; max-height: 100px; width: auto; height: auto; }
  .rmvoz-legacy .rmvoz-home-avatar { display: block; order: 1; float: none; max-width: 100px; padding: 9px; }
  .rmvoz-legacy .rmvoz-home-avatar img { max-width: 100%; height: auto; }
  .rmvoz-auth-legacy ul.rmvoz-home-account { clear: none; line-height: 1.4; }
  .rmvoz-auth-legacy ul.rmvoz-home-account li { line-height: 1.4; }

  .rmvoz-forum-view #forumposts .postarea .inner,
  .rmvoz-aux-view #personal_messages .postarea .inner {
    box-sizing: border-box;
    padding: 1em;
    font-size: 18.6667px;
    line-height: 1.4;
    overflow-wrap: break-word;
  }
  .rmvoz-forum-view .rmvoz-message-heading { display: flow-root; }
  .rmvoz-forum-view #forumposts .postarea .keyinfo { width: auto; max-width: 100%; }
  .rmvoz-legacy .inner img { max-width: 80%; height: auto; }
  .rmvoz-legacy .inner iframe, .rmvoz-legacy .inner object, .rmvoz-legacy .inner embed { max-width: 100%; }
  .rmvoz-legacy .inner .bbc_link { overflow-wrap: anywhere; }
  .rmvoz-legacy .inner .bbc_table_container { max-width: 100%; overflow: auto; }

  /* Auxiliary screens use the same readable mobile typography. */
  .rmvoz-aux-view .table_grid,
  .rmvoz-aux-view #personal_messages .table_grid td { font-size: 13.3333px; }
  .rmvoz-aux-view .rmvoz-recent-post .list_posts,
  .rmvoz-aux-view .rmvoz-profile-post .post .inner { font-size: 18.6667px; line-height: 1.4; overflow-wrap: break-word; }
  .rmvoz-aux-view .rmvoz-recent-post h3,
  .rmvoz-aux-view .rmvoz-profile-post h3.catbg { font-size: 21.3333px; }
  .rmvoz-aux-view h3.catbg, .rmvoz-aux-view h3.titlebg,
  .rmvoz-aux-view h4.catbg, .rmvoz-aux-view h4.titlebg,
  .rmvoz-aux-view .rmvoz-recent-post h4.titlebg,
  .rmvoz-aux-view .rmvoz-profile-post h4.titlebg { height: auto; min-height: 0; line-height: 1.4; overflow-wrap: break-word; }
  .rmvoz-aux-view #statistics .stats dt,
  .rmvoz-aux-view #statistics .stats dd { font-size: 16px; }
  .rmvoz-aux-view table#stats { display: block; box-sizing: border-box; max-width: 100%; overflow-x: auto; }
  #wrapper.rmvoz-legacy h3.catbg,
  #wrapper.rmvoz-legacy h3.titlebg { height: auto; line-height: 1.4; }
  .rmvoz-aux-view .rmvoz-search-table .table_grid { table-layout: fixed; }
  .rmvoz-aux-view .rmvoz-search-table th:nth-child(2),
  .rmvoz-aux-view .rmvoz-search-table td.subject { width: 65%; }
  .rmvoz-aux-view .rmvoz-search-table th:nth-child(4),
  .rmvoz-aux-view .rmvoz-search-table td.starter { display: none; }
  .rmvoz-aux-view .rmvoz-search-table th:nth-child(5),
  .rmvoz-aux-view .rmvoz-search-table td.lastpost { width: 35%; }
  .rmvoz-aux-view .rmvoz-search-table th,
  .rmvoz-aux-view .rmvoz-search-table td { overflow-wrap: break-word; word-break: normal; }

  /* Forms and the editor must fit without shrinking labels or losing fields. */
  .rmvoz-aux-view #advanced_search dt,
  .rmvoz-aux-view #advanced_search dd { box-sizing: border-box; width: 100%; margin-left: 0; }
  .rmvoz-aux-view #simple_search #search_term_input input { box-sizing: border-box; max-width: 100%; }
  .rmvoz-aux-view #search_term_input { overflow-wrap: break-word; }
  .rmvoz-aux-view dl.settings dt, .rmvoz-aux-view dl.settings dd,
  .rmvoz-aux-view dl.register_form dt, .rmvoz-aux-view dl.register_form dd,
  .rmvoz-aux-view #post_header dt, .rmvoz-aux-view #post_header dd,
  .rmvoz-aux-view #edit_poll dl.poll_options dt,
  .rmvoz-aux-view #edit_poll dl.poll_options dd { box-sizing: border-box; float: none; width: 100%; margin-left: 0; }
  .rmvoz-aux-view input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
  .rmvoz-aux-view select, .rmvoz-aux-view textarea { box-sizing: border-box; max-width: 100%; }
  /* SMF can show the login form while retaining a requested board/topic URL. */
  .rmvoz-legacy .login { box-sizing: border-box; width: auto; max-width: 100%; }
  .rmvoz-legacy .login dt, .rmvoz-legacy .login dd { float: none; width: auto; }
  .rmvoz-legacy .login input, .rmvoz-legacy .login select { box-sizing: border-box; max-width: 100%; }
  .rmvoz-aux-view .sceditor-container { box-sizing: border-box; width: 100% !important; max-width: 100%; }
  .rmvoz-aux-view .sceditor-container textarea,
  .rmvoz-aux-view .sceditor-container iframe { box-sizing: border-box; max-width: 100%; }
  .rmvoz-aux-view .sceditor-toolbar { white-space: normal; }
  .rmvoz-aux-view #post_area .roundframe,
  body.action_profile .rmvoz-aux-view .roundframe,
  body.action_pm .rmvoz-aux-view .roundframe { padding: 12px; }
  .rmvoz-aux-view .buttonlist > ul, .rmvoz-aux-view .generic_menu .dropmenu { flex-wrap: wrap; }
  .rmvoz-aux-view .generic_menu .dropmenu > li > a { height: auto; min-height: 30px; line-height: 30px; }
  .rmvoz-aux-view .roundframe, .rmvoz-aux-view .windowbg,
  .rmvoz-aux-view #admin_content { min-width: 0; overflow-wrap: break-word; }
  .rmvoz-profile-summary #detailedinfo div.content dt,
  .rmvoz-profile-summary #detailedinfo div.content dd { box-sizing: border-box; float: none; width: 100%; margin-left: 0; }
}
