/* freedisk.ru / freestuffok.com: phone layout on top of the original table layout (2026-09-24).
   Desktop is untouched: every rule is inside the media query. Hooks (classes) are set in
   html/up.php (fd-layout, fd-top, fd-topad, fd-main, fd-left), index.php (fd-center), html/right.php (fd-right). */

@media (max-width: 760px) {
    body { -webkit-text-size-adjust: 100%; }

    /* the page-wide table becomes a single column */
    table.fd-layout, table.fd-layout > tbody, table.fd-layout > tbody > tr { display: block; width: 100% !important; }
    table.fd-layout > tbody > tr > td { display: block; width: auto !important; padding: 8px 10px !important; white-space: normal !important; }

    /* header: logo + languages side by side, the 728px banner hidden (it cannot fit) */
    tr.fd-top { display: flex !important; flex-wrap: wrap; align-items: center; justify-content: space-between; }
    tr.fd-top > td { flex: 0 1 auto; }
    tr.fd-top > td.fd-topad { display: none !important; }

    /* main row: the catalog first, then the menu, then the side blocks */
    tr.fd-main { display: flex !important; flex-direction: column; }
    tr.fd-main > td.fd-center { order: 1; }
    tr.fd-main > td.fd-left { order: 2; }
    tr.fd-main > td.fd-right { order: 3; }

    /* nothing wider than the screen: old nowrap cells (region filter) and long words may wrap */
    table.fd-layout td, table.fd-layout td[nowrap] { white-space: normal !important; }
    td.fd-center { overflow-wrap: break-word; }
    table.fd-layout table { max-width: 100% !important; }
    table.fd-layout img { max-width: 100%; height: auto; }
    table.fd-layout ins.adsbygoogle { max-width: 100% !important; overflow: hidden; }
    table.fd-layout iframe { max-width: 100%; }
    table.fd-layout input[type=text], table.fd-layout input[type=password], table.fd-layout textarea { max-width: 100%; box-sizing: border-box; }

    /* readable text: 12px/10px were fine on 2008 monitors, not on phones */
    .p, .p2, .menu1 { font-size: 15px !important; line-height: 1.45; }
    .up, .bl { font-size: 12px !important; }
    .menu { font-size: 16px !important; }
    #relatedmenudiv a { padding: 10px 8px 10px 16px; }

    /* bigger tap targets in lists */
    ul.p li, table.fd-layout li { margin-bottom: 6px; }
}
