/* mobile.css - mobile optimisation for the public site (loaded after style.css). Created 2026-11-17.
   Everything is inside media queries, so the desktop layout does not change. */
@media (max-width: 860px) {
  /* grid tracks "1fr" grow to the content width and push the page sideways: make them shrinkable */
  .kb-layout, .mon-detail, .rl-layout, .cab, .home-hero, .dl-work { grid-template-columns: minmax(0, 1fr); }
  .getgame-cols { grid-template-columns: minmax(0, 1fr) !important; }  /* download page: 2 columns -> 1, and shrinkable */
  .kb-layout > *, .mon-detail > *, .rl-layout > *, .cab > *, .dl-work > *, .getgame-cols > * { min-width: 0; }
  .rl-text, .drop-table td, .kb-side, .mon-card, article, .news-body { overflow-wrap: anywhere; }
  img, video, canvas, svg { max-width: 100%; }
  img { height: auto; }
}
@media (max-width: 640px) {
  html, body { overflow-x: hidden; }
  .wrap { padding-left: 14px; padding-right: 14px; }
  /* header: logo and buttons in one row, menu scrolls sideways in one line; socials are in the footer */
  .site-header .wrap { flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 10px; padding-top: 8px; padding-bottom: 8px; }
  .logo .brand-logo { height: 46px; }
  .nav-social { display: none; }
  .nav-actions { width: auto; flex: 1 1 auto; justify-content: flex-end; flex-wrap: wrap; white-space: normal; gap: 8px; }
  .nav-actions .btn { padding: 0 14px; }
  .btn-dl-top { padding: 0 14px; font-size: .88rem; }
  .nav-links { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 0 -14px; padding: 0 14px 2px; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a { white-space: nowrap; padding: 10px 14px; }
  /* logged-in header: name and "Logout" are duplicated in the cabinet menu, hide them to keep the header short */
  .nav-actions .user-pill, .nav-actions a[href="/logout.php"] { display: none; }
  /* cabinet menu: one row that scrolls sideways instead of several uneven rows */
  .cab-nav { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .cab-nav::-webkit-scrollbar { display: none; }
  .cab-nav a { flex: 0 0 auto; white-space: nowrap; }
  /* the floating "Have a question?" hint covers the text, keep only the round button */
  .sw-hint { display: none !important; }  /* finger-sized buttons and fields */
  .btn, .btn-dl-top { height: auto; min-height: 44px; padding-top: 8px; padding-bottom: 8px; line-height: 1.25; }
  input:not([type=checkbox]):not([type=radio]), select, textarea { min-height: 44px; font-size: 16px; }  /* 16px: iPhone does not zoom in on focus */
  .kb-tab { padding-top: 11px; padding-bottom: 11px; }
  .getgame-btn { white-space: normal; padding-left: 16px; padding-right: 16px; }
  .rl-sanc .rl-sanc-h { white-space: normal; max-width: 100%; }  /* rules: long penalty caption must wrap */
  /* wide tables scroll inside their own block */
  .drop-table, .table-wrap, table.rating, .tbl-scroll { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  /* text no smaller than 12px */
  .tw-bd b, .dl .lbl, .lbl { font-size: 12px; }
  .cab-nav, .nav-links { position: relative; }  /* for mobile.js: scroll the active tab into view */
  body .tag, body .cnt, body .kq-place, body .rl-sanc-t, body .rl-sanc-h, body .rl-sanc-h i, body .rl-toc-h, body .lbl, body .k, body th, body small { font-size: 12px !important; }
  .drop-table td { padding-top: 10px; padding-bottom: 10px; }
}