/*
 * Мобильная адаптация 1796web.com
 * Десктопный вид не затрагивается: правила действуют до 979px.
 */

@media only screen and (max-width: 979px) {
    html {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    html,
    body {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow-x: hidden;
    }

    body {
        margin: 0 !important;
        font-size: 16px !important;
    }

    .container {
        box-sizing: border-box;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 10px;
    }

    /* Две главные таблицы: шапка и основной каркас страницы. */
    .container > table {
        display: block;
        box-sizing: border-box;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
    }

    .container > table > tbody,
    .container > table > tbody > tr {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
    }

    .container > table > tbody > tr > td {
        display: block;
        box-sizing: border-box;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
    }

    .left-column,
    .right-column {
        float: none !important;
        box-sizing: border-box;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
    }

    /* Сохраняем изображения и логотип в пределах экрана. */
    img,
    video,
    iframe,
    object,
    embed,
    svg {
        max-width: 100% !important;
    }

    img,
    video {
        height: auto !important;
    }

    iframe,
    object,
    embed {
        box-sizing: border-box;
    }

    h1 {
        font-size: 1.35rem !important;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    h2 {
        font-size: 1.12rem !important;
        line-height: 1.35;
    }

    p,
    li,
    td,
    th {
        overflow-wrap: anywhere;
        word-break: normal;
    }

    p,
    ul,
    ol {
        font-size: 1rem !important;
        line-height: 1.65 !important;
    }

    p {
        margin-right: 0 !important;
        margin-left: 0 !important;
        text-align: left;
        text-indent: 1.25rem;
    }

    /* Меню остаётся в прежнем стиле, но получает удобные зоны нажатия. */
    .tdmenu,
    .tdleftmenu,
    .tdtopmenu {
        box-sizing: border-box;
        width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
    }

    .tdmenu a,
    .tdleftmenu a,
    .tdtopmenu a {
        display: block;
        box-sizing: border-box;
        min-height: 42px;
        padding: 10px 8px;
    }

    /* Узкие служебные таблицы могут прокручиваться внутри себя. */
    .right-column table,
    .left-column table {
        max-width: 100% !important;
    }

    input,
    select,
    textarea,
    button {
        box-sizing: border-box;
        max-width: 100% !important;
        font-size: 16px;
    }

    .attblock {
        float: none !important;
        box-sizing: border-box;
        width: 100% !important;
        margin: 12px 0;
    }

    .footer-inner,
    table.footer {
        box-sizing: border-box;
        width: 100% !important;
        max-width: 100% !important;
    }

    table.footer,
    table.footer tbody,
    table.footer tr,
    table.footer td {
        display: block;
        width: 100% !important;
        text-align: left !important;
        white-space: normal !important;
    }

    table.footer td.right {
        margin-top: 10px !important;
    }

    .a2a_kit {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
    }

    .donate-row {
        flex-wrap: wrap;
    }
}

@media only screen and (max-width: 520px) {
    .container {
        padding-right: 8px;
        padding-left: 8px;
    }

    /* Парные портреты на главной сохраняются рядом и уменьшаются. */
    .right-column > table[align="center"] td {
        padding: 3px !important;
    }

    .right-column > table[align="center"] img {
        width: auto !important;
        max-height: 210px;
    }

    .qr-thumb {
        width: 82px !important;
        height: 82px !important;
    }
}

/* Collapsible navigation created by include-top.php. */
.mobile-menu-toggle {
    display: none;
}

@media only screen and (max-width: 979px) {
    .container > table > tbody > tr > td.mobile-collapsible-menu,
    body > hr[width="90%"] + table[width="90%"] > tbody > tr:first-child > td.mobile-collapsible-menu {
        order: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 8px !important;
    }

    .mobile-collapsible-menu:not(.is-open) > :not(.mobile-menu-toggle) {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 54px;
        margin: 0;
        padding: 8px 10px;
        border: 1px solid #075858;
        border-radius: 10px;
        background: linear-gradient(180deg, #179292 0%, #087676 52%, #056363 100%);
        box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 3px 7px rgba(0,68,68,.3);
        color: #fff;
        font: bold 17px/1.2 Arial, sans-serif;
        letter-spacing: 1.2px;
        text-shadow: 0 1px 1px rgba(0,0,0,.35);
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-menu-toggle:focus-visible {
        outline: 3px solid #087f7f;
        outline-offset: 2px;
    }

    .mobile-menu-toggle > span:first-child,
    .mobile-menu-arrow {
        display: inline-flex;
        flex: 0 0 34px;
        width: 34px;
        height: 34px;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(255,255,255,.28);
        border-radius: 50%;
        background: rgba(255,255,255,.14);
        box-shadow: inset 0 1px 1px rgba(255,255,255,.2);
        text-shadow: none;
    }

    .mobile-menu-toggle > span:first-child {
        font: bold 22px/1 Arial, sans-serif;
    }

    .mobile-menu-arrow {
        font: 12px/1 Arial, sans-serif;
        transition: transform .2s ease;
    }

    .mobile-collapsible-menu.is-open .mobile-menu-arrow {
        transform: rotate(180deg);
    }

    .mobile-collapsible-menu.is-open .mobile-menu-toggle {
        margin-bottom: 8px;
        background: linear-gradient(180deg, #087777 0%, #055d5d 100%);
    }

    .mobile-source-menu {
        display: none !important;
    }

    .mobile-standalone-menu {
        display: block;
        box-sizing: border-box;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto 8px;
        padding: 8px;
    }

    table.articlehead,
    table.tdborder,
    nav .navigation > table {
        width: 100% !important;
        max-width: 100% !important;
    }

    .mobile-menu-layout-row {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .mobile-menu-layout-row > td {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .mobile-main-content {
        order: 1 !important;
        padding: 10px !important;
    }

    .mobile-main-content p > img[align="right"],
    .mobile-main-content p > img[align="left"] {
        float: none !important;
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        margin: 8px auto 14px !important;
    }

    td.tdpath {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 8px 10px !important;
    }

    td.tdpath:first-child,
    tr > td:empty + td.tdpath {
        width: 100% !important;
    }

    .mobile-path-row {
        display: block !important;
        width: 100% !important;
    }

    .mobile-path-row > td:empty {
        display: none !important;
    }

    .mobile-merged-menu {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        margin: 0 0 10px;
        padding: 8px;
        border: 1px solid #8bc7c7;
        border-radius: 8px;
        background: #eaffff;
    }

    .mobile-merged-menu-title {
        grid-column: 1 / -1;
        padding: 2px 4px 5px;
        color: #075f5f;
        font: bold 14px/1.2 Arial, sans-serif;
        letter-spacing: .4px;
        text-align: center;
        text-transform: uppercase;
    }

    .mobile-merged-menu-link {
        display: flex !important;
        align-items: center;
        justify-content: center;
        min-height: 42px;
        padding: 7px 6px !important;
        border: 1px solid #77b4b4;
        border-radius: 6px;
        background: linear-gradient(#f4ffff, #b9e3e3);
        color: #003f3f !important;
        font: bold 13px/1.2 Arial, sans-serif;
        text-align: center;
        text-decoration: none !important;
        white-space: normal !important;
    }

    .mobile-merged-menu-link:active {
        background: #95cccc;
    }
}

/* Pages without .container/.left-column/.right-column (for example homeopathy.htm). */
@media only screen and (max-width: 979px) {
    body > table[width="90%"] {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    body > table[width="90%"] > tbody {
        display: block;
        width: 100% !important;
    }

    /* Header: keep the round logo and title next to each other. */
    body > table[width="90%"]:first-of-type > tbody > tr {
        display: flex;
        align-items: center;
        width: 100% !important;
    }

    body > table[width="90%"]:first-of-type > tbody > tr > td:first-child {
        flex: 0 0 23%;
        width: 23% !important;
    }

    body > table[width="90%"]:first-of-type > tbody > tr > td:last-child {
        flex: 1 1 77%;
        width: 77% !important;
        min-width: 0 !important;
    }

    body > table[width="90%"]:first-of-type img {
        display: block;
        width: 100% !important;
        height: auto !important;
    }

    /* Prevent the five top links from collapsing into vertical letters. */
    body > table[width="90%"]:first-of-type table,
    body > table[width="90%"]:first-of-type table > tbody {
        display: block;
        width: 100% !important;
    }

    body > table[width="90%"]:first-of-type table > tbody > tr {
        display: flex;
        flex-wrap: wrap;
        width: 100% !important;
    }

    body > table[width="90%"]:first-of-type .tdtopmenu {
        flex: 1 1 50%;
        width: 50% !important;
    }

    body > table[width="90%"]:first-of-type .tdtopmenu a,
    body > table[width="90%"]:first-of-type .tdtopmenu strong {
        display: flex !important;
        align-items: center;
        justify-content: center;
        min-height: 40px;
        padding: 6px 4px;
        line-height: 1.15;
        text-align: center;
        white-space: normal !important;
        overflow-wrap: anywhere;
    }

    /* Main legacy table: article first, navigation/sidebar afterwards. */
    body > hr[width="90%"] + table[width="90%"] > tbody > tr:first-child {
        display: flex !important;
        flex-direction: column;
        width: 100% !important;
    }

    body > hr[width="90%"] + table[width="90%"] > tbody > tr:first-child > td {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    body > hr[width="90%"] + table[width="90%"] > tbody > tr:first-child > td:first-child {
        order: 2;
        padding: 10px 8px !important;
    }

    body > hr[width="90%"] + table[width="90%"] > tbody > tr:first-child > td:nth-child(2) {
        order: 1;
        padding: 10px !important;
    }

    body > hr[width="90%"] + table[width="90%"] .tdleftmenu a {
        width: 100% !important;
        white-space: normal !important;
    }

    /* Old align=right images must not leave a one-letter-wide text column. */
    body > hr[width="90%"] + table[width="90%"] > tbody > tr:first-child > td:nth-child(2) p > img[align="right"],
    body > hr[width="90%"] + table[width="90%"] > tbody > tr:first-child > td:nth-child(2) p > img[align="left"] {
        float: none !important;
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        margin: 8px auto 14px !important;
    }

    body > hr[width="90%"] + table[width="90%"] > tbody > tr:first-child > td:nth-child(2) > p {
        clear: both;
        margin: 0 0 14px !important;
        line-height: 1.55 !important;
        text-indent: 0 !important;
    }

    body > hr[width="90%"] + table[width="90%"] > tbody > tr:first-child > td:nth-child(2) > h1 {
        margin: 4px 0 12px !important;
        text-align: center;
    }
}

@media print {
    html,
    body {
        overflow: visible !important;
    }
}

/*
 * Layout corrections for the legacy table structure.
 * These rules are kept at the end so they override older inline dimensions.
 */
@media only screen and (max-width: 979px) {
    *,
    *::before,
    *::after {
        box-sizing: border-box;
    }

    body > br:first-child {
        display: none;
    }

    .container > table > tbody > tr {
        display: flex !important;
        flex-direction: column;
    }

    /* Keep the logo and the title image in one scaled row. */
    .container > table:first-of-type > tbody > tr {
        flex-direction: row !important;
        align-items: center;
    }

    .container > table:first-of-type > tbody > tr > td:first-child {
        flex: 0 0 23%;
        width: 23% !important;
    }

    .container > table:first-of-type > tbody > tr > td:last-child {
        flex: 1 1 77%;
        width: 77% !important;
    }

    .container > table:first-of-type img {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
    }

    /* Show portraits and the main article first; move the whole sidebar below. */
    .left-column {
        order: 2;
        padding: 8px 6px 10px !important;
    }

    .right-column {
        order: 1;
        padding-top: 8px !important;
    }

    .left-column > table,
    .left-column > table > tbody {
        width: 100% !important;
        max-width: 100% !important;
    }

    .tdmenu a,
    .tdleftmenu a,
    .tdtopmenu a {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 44px;
        padding: 8px 10px;
        line-height: 1.25;
        white-space: normal;
    }

    .right-column > table {
        width: 100% !important;
        max-width: 100% !important;
    }

    pre,
    code {
        max-width: 100%;
        overflow-x: auto;
        white-space: pre-wrap;
    }

    input[type="text"],
    input[type="search"],
    textarea,
    .gsc-control-cse,
    .gsc-control-cse table {
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media only screen and (max-width: 520px) {
    /* The two portraits on the home page remain side by side and scale down. */
    .right-column > table[align="center"] > tbody > tr {
        display: table-row !important;
    }

    .right-column > table[align="center"] > tbody > tr > td {
        display: table-cell !important;
        width: 50% !important;
        padding: 3px !important;
        vertical-align: top;
    }

    .right-column > table[align="center"] img {
        width: 100% !important;
        height: auto !important;
    }
}

/* Final order override for both generations of page markup. */
@media only screen and (max-width: 979px) {
    body .mobile-collapsible-menu.mobile-collapsible-menu {
        order: 0 !important;
    }

    /* Standalone book/article pages with the old 70% layout. */
    body > .navigation,
    body > .navigation > table,
    body > table.articlehead,
    body > table.tdborder {
        box-sizing: border-box;
        width: 100% !important;
        max-width: 100% !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
    }

    body > .navigation > table {
        margin-bottom: 6px !important;
    }

    body > .navigation .tdpath {
        padding: 9px 10px !important;
        font-size: 13px !important;
        line-height: 1.45 !important;
    }

    body > table.articlehead {
        table-layout: fixed;
    }

    body > table.articlehead td {
        height: auto !important;
        padding: 5px 7px !important;
    }

    body > table.articlehead td[rowspan] {
        width: 76px !important;
        padding: 5px !important;
    }

    body > table.articlehead td[rowspan] img {
        display: block;
        width: 66px !important;
        height: auto !important;
        margin: 0 auto !important;
    }

    body > table.articlehead h1 {
        margin: 4px 0 !important;
        font-size: 1.2rem !important;
        line-height: 1.25 !important;
        text-align: center;
    }

    body > table.tdborder > tbody > tr > td.article-body {
        box-sizing: border-box;
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 13px !important;
        font-size: 16px !important;
        line-height: 1.58 !important;
    }

    body > table.tdborder .article-body > p {
        margin: 0 0 1em !important;
        font-size: 16px !important;
        line-height: 1.58 !important;
        text-align: left !important;
        text-indent: 1.1em !important;
    }

    body > table.tdborder .article-body > p:first-child {
        text-indent: 0 !important;
    }

    body > table.tdborder .article-body h2 {
        margin: 1.15em 0 .65em !important;
        font-size: 1.08rem !important;
        line-height: 1.35 !important;
        text-align: center;
    }

    body > table.tdborder .article-body > table {
        width: 100% !important;
        max-width: 100% !important;
        table-layout: auto !important;
    }

    body > table.tdborder .article-body > table td {
        width: auto !important;
        height: auto !important;
        padding: 4px !important;
    }

    body > table.tdborder .article-body > table td:empty,
    body > table.tdborder .article-body > table td:first-child:has(> p:empty) {
        display: none !important;
    }

    body > table.tdborder .article-body > table td p {
        margin: 5px 0 !important;
        text-indent: 0 !important;
    }

    body > table.tdborder .article-body p[style*="text-align:center"] {
        text-align: center !important;
        text-indent: 0 !important;
    }
}

@media screen and (max-width: 767px) {

  /* Основные таблицы статьи */
  table.articlehead,
  table.tdborder,
  .navigation > table[width="70%"] {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  /* Текстовая область */
  td.article-body {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px !important;
    overflow-wrap: break-word;
  }

  /* Внутренние таблицы с текстом */
  td.article-body > table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: auto !important;
  }

  /* Цитата: убираем пустую левую колонку */
  td.article-body > table[width="96%"] > tbody > tr > td:first-child {
    display: none !important;
  }

  td.article-body > table[width="96%"] > tbody > tr > td:last-child {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box;
  }

  /* Абзацы и заголовки */
  td.article-body p,
  td.article-body h2 {
    max-width: 100%;
    overflow-wrap: break-word;
  }

  /* Изображения */
  td.article-body img {
    max-width: 100%;
    height: auto;
  }

  /* Защита от фиксированной ширины */
  td.article-body pre {
    max-width: 100%;
    overflow-x: auto;
  }
}


/* Fix: prevent legacy article table intrinsic width from clipping text. */
@media only screen and (max-width: 979px) {
  body > table.tdborder {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
  }
  body > table.tdborder > tbody > tr > td.article-body {
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }
  body > table.tdborder .article-body > table[width="96%"] {
    table-layout: fixed !important;
  }
  body > table.tdborder .article-body > table[width="96%"] > tbody > tr > td:last-child {
    display: table-cell !important;
    width: 100% !important;
  }
}

/* Mobile correction for legacy pages with a 95% outer layout table. */
@media only screen and (max-width: 979px) {
  body > table[width="95%"] {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    table-layout: fixed !important;
  }
  body > table[width="95%"] > tbody {
    display: block !important;
    width: 100% !important;
  }
  body > table[width="95%"] > tbody > tr.mobile-menu-layout-row {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  body > table[width="95%"] > tbody > tr.mobile-menu-layout-row > td {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  body > table[width="95%"] > tbody > tr.mobile-menu-layout-row > td.mobile-main-content {
    overflow-wrap: anywhere;
  }
  body > table[width="95%"] > tbody > tr.mobile-menu-layout-row > td.mobile-main-content h1 {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px;
    text-align: center;
  }
  body > table[width="95%"] > tbody > tr.mobile-menu-layout-row > td.mobile-main-content h1 img {
    width: 20px !important;
    height: auto !important;
    margin: 0 3px !important;
  }
}

/* Responsive nested legacy book tables, including Nash contents. */
@media only screen and (max-width: 979px) {
  .container, .container .main-container, .container .navigation {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  .container .main-container > table.tdborder,
  .container .main-container > table.articlehead,
  .container .navigation > table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
  }
  .container .main-container > table.tdborder > tbody > tr > td {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 8px !important;
    overflow-wrap: anywhere;
  }
  .container .main-container > table.tdborder > tbody > tr > td > table[width="650"] {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
  }
  .container .main-container > table.tdborder td.tdhs {
    width: auto !important;
    max-width: 100% !important;
    padding: 12px !important;
  }
  .container .main-container > table.tdborder .contents,
  .container .main-container > table.tdborder ul.contents {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .container .main-container > table.tdborder ul.contents {
    padding: 0 8px 0 18px !important;
  }
  .container .main-container > table.tdborder ul.contents li,
  .container .main-container > table.tdborder ul.contents a {
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal !important;
  }
}


@media screen and (max-width: 767px) {
  /* Шапки внутренних статей */
  table.articlehead {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    box-sizing: border-box;
  }

  table.articlehead td {
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-wrap: anywhere;
    box-sizing: border-box;
  }

  /* Фотография автора */
  table.articlehead td[rowspan] {
    width: 110px !important;
    vertical-align: top;
  }

  table.articlehead img {
    max-width: 100%;
    height: auto;
  }

  /* Заголовки */
  table.articlehead h1,
  table.articlehead h2 {
    max-width: 100%;
    overflow-wrap: anywhere;
    line-height: 1.3;
  }
}


/* Guestbook only: legacy PHP output, desktop remains unchanged. */
@media only screen and (max-width: 979px) {
  body.guestbook-mobile > table:first-of-type { width:100% !important; max-width:100% !important; table-layout:fixed; }
  body.guestbook-mobile > table:first-of-type td { width:23% !important; }
  body.guestbook-mobile > table:first-of-type td + td { width:77% !important; }
  body.guestbook-mobile > table:first-of-type img { display:block; width:100% !important; height:auto !important; }
  body.guestbook-mobile > hr[width="90%"] + table[width="90%"] { display:block; width:100% !important; max-width:100% !important; margin:0 !important; }
  body.guestbook-mobile > hr[width="90%"] + table[width="90%"] > tbody,
  body.guestbook-mobile > hr[width="90%"] + table[width="90%"] > tbody > tr { display:block; width:100% !important; }
  body.guestbook-mobile .gb-mobile-sidebar,
  body.guestbook-mobile .gb-mobile-main { display:block; width:100% !important; max-width:100% !important; min-width:0 !important; box-sizing:border-box; }
  body.guestbook-mobile .gb-mobile-sidebar { padding:8px !important; }
  body.guestbook-mobile .gb-mobile-main { padding:10px !important; }
  body.guestbook-mobile .gb-mobile-toggle { display:flex; justify-content:space-between; align-items:center; width:100%; min-height:52px; padding:10px 14px; border:1px solid #075858; border-radius:9px; background:#087676; color:white; font:bold 17px Arial,sans-serif; cursor:pointer; }
  body.guestbook-mobile .gb-mobile-menu-panel { display:none; }
  body.guestbook-mobile .gb-mobile-sidebar.gb-menu-open .gb-mobile-menu-panel { display:block; padding:8px 0; }
  body.guestbook-mobile .gb-mobile-menu-panel > table { width:100% !important; }
  body.guestbook-mobile .gb-mobile-menu-panel .tdmenu a { min-height:44px; }
  body.guestbook-mobile .gb-mobile-main > h1 { margin:10px 0 16px !important; text-align:center; }
  body.guestbook-mobile .gb-mobile-main .gb-header,
  body.guestbook-mobile .gb-mobile-main .gb-container,
  body.guestbook-mobile .gb-mobile-main .gb-row { width:100% !important; max-width:100% !important; box-sizing:border-box; }
  body.guestbook-mobile .gb-mobile-main .gb-header,
  body.guestbook-mobile .gb-mobile-main .gb-header > tbody,
  body.guestbook-mobile .gb-mobile-main .gb-header > tbody > tr,
  body.guestbook-mobile .gb-mobile-main .gb-header > tbody > tr > td { display:block; width:100% !important; max-width:100% !important; box-sizing:border-box; }
  body.guestbook-mobile .gb-mobile-main .gb-header > tbody > tr > td { padding:6px !important; }
  body.guestbook-mobile .gb-mobile-main .header-button .button { display:block; padding:12px; text-align:center; }
  body.guestbook-mobile .gb-mobile-main .page-selector { overflow-x:auto; white-space:nowrap; -webkit-overflow-scrolling:touch; padding:10px 4px !important; }
  body.guestbook-mobile .gb-mobile-main .page-selector a,
  body.guestbook-mobile .gb-mobile-main .page-selector .current-page { display:inline-block; margin:3px; padding:5px 7px; }
  body.guestbook-mobile .gb-mobile-main .gb-container td,
  body.guestbook-mobile .gb-mobile-main .gb-row td,
  body.guestbook-mobile .gb-mobile-main .post-text { overflow-wrap:anywhere; white-space:normal; max-width:100%; }
  body.guestbook-mobile .gb-mobile-main textarea,
  body.guestbook-mobile .gb-mobile-main input:not([type="checkbox"]):not([type="radio"]),
  body.guestbook-mobile .gb-mobile-main select { max-width:100% !important; box-sizing:border-box; font-size:16px; }
  body.guestbook-mobile .gb-mobile-main img { max-width:100% !important; height:auto !important; }
}
