@scope (.km-inner-main) {
* { box-sizing: border-box; }
:scope { margin: 0; background: #f9f9f2; color: #232529; font: 15px system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.books-sidebar { position: fixed; inset: 0 auto 0 0; width: 190px; padding: 22px 16px; background: #df000b; color: #fff; }
.books-sidebar a { display: block; padding: 10px; font-weight: 700; }
.books-sidebar img { width: 92px; display: block; margin: auto; }
.books-sidebar [aria-current] { background: #9f0008; border-radius: 5px; }
.books-shell { margin-left: 190px; }
.books-header, .books-back { display: block; background: #191919; color: #fff; padding: 12px 16px; }
.books-header { min-height: 100px; display: flex; justify-content: space-between; align-items: center; }
.books-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(225px, 29%); }
.books-periods, .books-sports { display: flex; background: #fff; }
.books-periods button { flex: 1; padding: 12px 0; border: 0; border-bottom: 3px solid transparent; background: transparent; color: inherit; font-weight: 800; }
.books-periods button[aria-pressed="true"] { border-bottom-color: currentColor; }
.books-sports { overflow: auto; }
.books-sports a { padding: 12px 20px; display: grid; justify-items: center; gap: 6px; font-weight: 700; text-transform: uppercase; font-size: 12px; }
.books-sports img, .books-matches h2 img { width: 22px; height: 22px; }
.books-matches { padding: 10px 12px; }
.books-matches section { margin-bottom: 20px; scroll-margin: 10px; }
.books-matches h2 { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 9px 12px; background: #282828; border-radius: 9px 9px 0 0; color: #fff; font-size: 14px; text-transform: uppercase; }
.km-match-rail { overflow: hidden; border-radius: 0 9px 9px 9px; background: #fff; }
.km-match-rail > a { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); align-items: center; gap: 10px; padding: 9px; border-bottom: 1px solid #ccc; }
.km-match-rail > a:last-child { border-bottom: 0; }
.books-prices { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; }
.books-price { border-radius: 6px; padding: 8px 1px; background: #d7d7d7; text-align: center; font-weight: 800; }
.books-price.back { background: #91c6fa; }
.books-price.lay { background: #ff9ecc; }
.books-live { color: #2a873d; margin-left: 6px; }
.books-slip { background: #ebebeb; border-left: 8px solid #fafaf2; min-height: 75vh; padding: 8px; }
.books-slip h2 { margin: 0; padding: 12px; background: #4f4f4f; color: #fff; font-size: 16px; }
.books-slip p { text-align: center; margin-top: 90px; }
.books-bottom { display: none; }
@media (max-width: 767px) {
    :scope { background: #d7d7d7; }
    .books-sidebar, .books-back, .books-slip { display: none; }
    .books-shell { margin: 0; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
    .books-header { min-height: 40px; }
    .books-header, .books-periods, .books-sports { background: #df000b; color: #fff; }
    .books-grid { display: block; }
    .books-matches { padding: 16px 5px; }
    .km-match-rail > a { grid-template-columns: 1fr; }
    .books-bottom { position: fixed; inset: auto 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding-bottom: env(safe-area-inset-bottom); background: #191919; color: #ccc; text-align: center; }
    .books-bottom a { padding: 5px 0; font-size: 10px; text-transform: uppercase; }
    .books-bottom span { display: block; font-size: 23px; }
    .books-bottom [aria-current] { color: #fff; border-bottom: 3px solid #fff; }
}

}
