/* supplement.css — точечные добавки поверх styles.css */

/* Article layout (desktop) */
.rdgc9zmhg-layout {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}
.rdgc9zmhg-main {
  flex: 1;
  min-width: 0;
}
.rdgc9zmhg-aside {
  flex: 0 0 240px;
  max-width: 240px;
  position: sticky;
  top: 20px;
  align-self: flex-start;
}
.rdgc9zmhg-aside-inner {
  background: #f6f4ef;
  padding: 18px 16px;
  border-left: 3px solid #8B2A2D;
}
.rdgc9zmhg-title {
  font-size: 26px;
  color: #8B2A2D;
  padding: 0 40px 14px;
  margin: 0;
  line-height: 1.25;
}
.rdgc9zmhg-body {
  padding: 0 40px;
  overflow-wrap: anywhere;
  word-wrap: break-word;
}
.rdgc9zmhg-table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0.835rem 0;
  min-width: 0;
}
.rdgc9zmhg-table-wrap table {
  margin: 0;
  width: max-content;
  min-width: 100%;
  max-width: none;
}

@media (max-width: 800px) {
  html, body {
    max-width: 100%;
    overflow-x: hidden;
  }

  #rahmen, #layer, #header, #footerimg, .submenu, .submenu td, .submenu table {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  #footerimg img, #headerimg {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }

  #content {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    padding: 24px 16px !important;
  }

  #content p, #content ol {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  #content img {
    max-width: 100% !important;
    height: auto !important;
  }

  #header {
    height: auto !important;
    min-height: 100px;
    overflow: hidden;
  }

  #logoimg {
    max-width: 55%;
    height: auto !important;
    margin: 28px 0 0 16px !important;
  }

  #slogan {
    display: none;
  }

  .submenu {
    height: auto !important;
    min-height: 36px;
  }

  .submenu table {
    width: 100% !important;
  }

  .submenu td {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    padding: 8px 12px !important;
    text-align: center !important;
    font-size: 13px !important;
    line-height: 1.4;
  }

  .submenu a:link,
  .submenu a:visited,
  .submenu a:active,
  .submenu a:hover {
    font-size: 13px !important;
    color: #F0EEEA !important;
  }

  /* Homepage floats → stack */
  #downloadimg,
  #butler1,
  #butler2,
  #butler3 {
    float: none !important;
    display: block !important;
    margin: 16px auto !important;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
  }

  #submain {
    margin-left: 0 !important;
  }

  /* Article: column layout + readable sidebar menu */
  .rdgc9zmhg-layout {
    flex-direction: column;
    gap: 24px;
    max-width: 100%;
  }

  .rdgc9zmhg-main,
  .rdgc9zmhg-body {
    min-width: 0;
    max-width: 100%;
  }

  .rdgc9zmhg-aside {
    flex: none;
    width: 100% !important;
    max-width: 100% !important;
    position: static;
  }

  .rdgc9zmhg-aside-inner {
    border-left: none;
    border-top: 3px solid #8B2A2D;
    box-sizing: border-box;
    padding: 20px 16px !important;
  }

  .rdgc9zmhg-aside .widget-title {
    display: block;
    font-size: 18px !important;
    font-weight: 700;
    color: #8B2A2D !important;
    margin: 0 0 14px;
    line-height: 1.3;
  }

  .rdgc9zmhg-aside .is-divider {
    display: none;
  }

  .rdgc9zmhg-aside ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .rdgc9zmhg-aside li {
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: 1px solid #e2ddd3;
  }

  .rdgc9zmhg-aside li:last-child {
    border-bottom: none;
  }

  .rdgc9zmhg-aside a {
    display: block !important;
    padding: 12px 4px !important;
    font-size: 15px !important;
    line-height: 1.35 !important;
    color: #2a2826 !important;
    text-decoration: none !important;
  }

  .rdgc9zmhg-aside a:hover,
  .rdgc9zmhg-aside a:active {
    color: #8B2A2D !important;
  }

  .rdgc9zmhg-title,
  .rdgc9zmhg-body {
    padding-left: 0;
    padding-right: 0;
  }

  .rdgc9zmhg-body p,
  .rdgc9zmhg-body ol,
  .rdgc9zmhg-body ul {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .rdgc9zmhg img,
  .rdgc9zmhg img[width] {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
  }

  .rdgc9zmhg-table-wrap {
    max-width: 100%;
    min-width: 0;
  }

  .rdgc9zmhg pre {
    max-width: 100%;
  }

  .romlidata img {
    max-width: 100% !important;
    height: auto !important;
  }

  .romlifooter img {
    max-width: 160px !important;
    width: auto !important;
    height: auto !important;
  }
}
