/* Fixed-width navigation frame only. The parent frameset owns its 170px expanded width. */
html.cailed-nav-page.cailed-sidebar-page {
    width: 100%;
    height: 100%;
    margin: 0;
    background: #fffaf2;
}
html.cailed-nav-page.cailed-sidebar-page body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: #fffaf2;
    color: #472d2b;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 14px;
}
html.cailed-nav-page.cailed-sidebar-page body #main {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 999;
    width: 100%;
    height: 100vh;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    border: 0;
    border-right: 1px solid #eadfcd;
    background: #fffaf2 !important;
    box-shadow: none;
    scrollbar-width: thin;
    scrollbar-color: #d9c5a6 #fffaf2;
    -webkit-overflow-scrolling: touch;
}
html.cailed-nav-page.cailed-sidebar-page #main::-webkit-scrollbar {
    width: 5px;
}
html.cailed-nav-page.cailed-sidebar-page #main::-webkit-scrollbar-track {
    background: #fffaf2;
}
html.cailed-nav-page.cailed-sidebar-page #main::-webkit-scrollbar-thumb {
    border-radius: 5px;
    background: #d9c5a6;
}
html.cailed-nav-page.cailed-sidebar-page #main .container {
    width: 100% !important;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 0 10px 14px !important;
    box-sizing: border-box;
}
html.cailed-nav-page.cailed-sidebar-page #main .nav-brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 76px;
    margin: 0 2px;
    padding: 6px 0;
    box-sizing: border-box;
    border-bottom: 1px solid #eadfcd;
}
html.cailed-nav-page.cailed-sidebar-page #main .nav-logo {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    width: auto;
    height: 100%;
    padding: 0;
    color: #472d2b;
    text-decoration: none;
}
html.cailed-nav-page.cailed-sidebar-page #main .nav-logo img {
    display: block;
    width: 140px;
    height: 45px;
    max-width: 140px;
    max-height: 45px;
    margin: 0;
    border: 0;
    object-fit: contain;
    object-position: left center;
}
html.cailed-nav-page.cailed-sidebar-page #main .cailed-brand-copy {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    margin: 0;
    padding: 0;
    border: 0;
    white-space: nowrap;
    line-height: 12px;
}
html.cailed-nav-page.cailed-sidebar-page #main .cailed-brand-domain {
    color: #b6202d;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .8px;
}
html.cailed-nav-page.cailed-sidebar-page #main .cailed-brand-caption {
    color: #8b7565;
    font-size: 9px;
    font-weight: 400;
    letter-spacing: .3px;
}
html.cailed-nav-page.cailed-sidebar-page #main .cailed-nav-caption {
    display: block;
    margin: 11px 10px 5px;
    padding: 0;
    color: #957542;
    font-size: 10px;
    font-weight: 600;
    line-height: 16px;
    letter-spacing: 1.2px;
}
html.cailed-nav-page.cailed-sidebar-page #main .cailed-tools-caption {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #eadfcd;
}
html.cailed-nav-page.cailed-sidebar-page #main .nav {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 1px;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0 !important;
    box-sizing: border-box;
    overflow: visible;
    border: 0;
    background: transparent;
    list-style: none;
}
html.cailed-nav-page.cailed-sidebar-page #main .nav::before,
html.cailed-nav-page.cailed-sidebar-page #main .nav::after {
    display: none;
}
html.cailed-nav-page.cailed-sidebar-page #main .nav > li {
    display: block;
    flex: 0 0 auto;
    float: none;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}
html.cailed-nav-page.cailed-sidebar-page #main .nav > li > a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    min-width: 0;
    height: 38px;
    margin: 0;
    padding: 0 10px;
    box-sizing: border-box;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #472d2b;
    font-size: 14px;
    font-weight: 500;
    line-height: 38px;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: none;
    transition: color .15s ease, background-color .15s ease;
}
html.cailed-nav-page.cailed-sidebar-page #main .nav > li > a:hover,
html.cailed-nav-page.cailed-sidebar-page #main .nav > li > a:focus {
    color: #981b28;
    background: #f8eee1;
}
html.cailed-nav-page.cailed-sidebar-page #main .lottery-main-nav > li > a.cailed-nav-current {
    color: #b6202d;
    background: #f9e7e3;
    font-weight: 700;
    box-shadow: inset 3px 0 0 #b6202d;
}
html.cailed-nav-page.cailed-sidebar-page #main .cailed-lottery-nav-logo {
    display: block;
    flex: 0 0 25px;
    width: 25px;
    height: 25px;
    margin: 0;
    border: 0;
    object-fit: contain;
}
html.cailed-nav-page.cailed-sidebar-page #main .cailed-home-icon {
    display: inline-flex;
    flex: 0 0 25px;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    color: #b6202d;
    font-size: 24px;
    font-weight: 400;
    line-height: 25px;
}
html.cailed-nav-page.cailed-sidebar-page #main .cailed-nav-label {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
html.cailed-nav-page.cailed-sidebar-page #main .lottery-sub-nav > li > a {
    height: 34px;
    padding-right: 12px;
    padding-left: 12px;
    color: #74574c;
    font-size: 13px;
    font-weight: 400;
    line-height: 34px;
}
html.cailed-nav-page.cailed-sidebar-page #main .lottery-sub-nav > li > a:hover,
html.cailed-nav-page.cailed-sidebar-page #main .lottery-sub-nav > li > a:focus {
    color: #981b28;
    background: #f8eee1;
}
html.cailed-nav-page.cailed-sidebar-page #main .lottery-sub-nav > li > a.cailed-nav-current {
    color: #ffffff;
    background: #b6202d;
    font-weight: 600;
    box-shadow: none;
}
html.cailed-nav-page.cailed-sidebar-page #main .cailed-account-nav > li > #denglu {
    margin-top: 7px;
    color: #9b6027;
    background: #f6ebd6;
    font-weight: 500;
}
html.cailed-nav-page.cailed-sidebar-page #main .cailed-account-nav > li > #denglu:hover,
html.cailed-nav-page.cailed-sidebar-page #main .cailed-account-nav > li > #denglu:focus {
    color: #79481b;
    background: #efdfbf;
}
html.cailed-nav-page.cailed-sidebar-page #main .nav > li > a:focus-visible,
html.cailed-nav-page.cailed-sidebar-page #main .nav-logo:focus-visible {
    outline: 2px solid #bd8a36;
    outline-offset: -2px;
}
@media (prefers-reduced-motion: reduce) {
    html.cailed-nav-page.cailed-sidebar-page #main .nav > li > a {
        transition: none;
    }
}

/* Secondary tools belong to the active lottery, before the next primary item. */
html.cailed-nav-page.cailed-sidebar-page #main .cailed-submenu-group {
    margin: 4px 0 8px 23px;
    padding: 0 0 0 10px;
    border-left: 1px solid #e6d4b9;
}
html.cailed-nav-page.cailed-sidebar-page #main .cailed-submenu-group .cailed-tools-caption {
    margin: 5px 8px 4px;
    padding: 0;
    border: 0;
    font-size: 9px;
    letter-spacing: .5px;
}
html.cailed-nav-page.cailed-sidebar-page #main .cailed-submenu-group .lottery-sub-nav > li > a {
    height: 32px;
    padding-left: 8px;
    padding-right: 5px;
    line-height: 32px;
    font-size: 12px;
}
html.cailed-nav-page.cailed-sidebar-page #main .lottery-main-nav > .cailed-nav-parent > a::after {
    content: '';
    width: 6px;
    height: 6px;
    margin-left: auto;
    margin-right: 3px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
}
html.cailed-nav-page.cailed-sidebar-page #main .cailed-account-nav {
    margin-top: 12px;
    padding-top: 10px !important;
    border-top: 1px solid #eadfcd;
}

/* Compact navigation keeps the original logo artwork and accessible full names. */
html.cailed-nav-page.cailed-sidebar-page #main .nav-brand { position: relative; }
html.cailed-nav-page.cailed-sidebar-page #main .cailed-nav-toggle {
    position: absolute; right: 0; bottom: 7px; display: flex; align-items: center; justify-content: center;
    width: 25px; height: 25px; padding: 0; border: 1px solid #ead8bd; border-radius: 5px;
    color: #9d2630; background: #fff5e7; font: 24px/1 sans-serif; cursor: pointer;
}
html.cailed-nav-page.cailed-sidebar-page #main .cailed-nav-toggle:hover { background: #f4e4cf; }
html.cailed-nav-page.cailed-sidebar-page #main .cailed-nav-toggle:focus-visible { outline: 2px solid #bd8a36; outline-offset: 2px; }
html.cailed-nav-page.cailed-sidebar-page #main .cailed-short-label { display: none; }
html.cailed-nav-page.cailed-sidebar-page #main .cailed-utility-nav {
    margin-top: 12px; padding-top: 10px !important; border-top: 1px solid #eadfcd;
}
html.cailed-nav-page.cailed-sidebar-page #main .cailed-utility-nav .cailed-video-icon {
    display: inline-flex; flex: 0 0 25px; width: 25px; height: 25px; align-items: center; justify-content: center;
    border-radius: 6px; color: #b6202d; background: #f8e9dc; font-size: 12px;
}
html.cailed-nav-page.cailed-sidebar-page #main .cailed-utility-nav > li > a.cailed-nav-current {
    color: #b6202d; background: #f9e7e3; font-weight: 700;
}
html.cailed-nav-page.cailed-sidebar-page #main .cailed-account-nav { margin-top: 4px; padding-top: 0 !important; border-top: 0; }
html.cailed-nav-page.cailed-sidebar-page.cailed-nav-compact #main .container { padding: 0 5px 12px !important; }
html.cailed-nav-page.cailed-sidebar-page.cailed-nav-compact #main .nav-brand {
    height: 90px; margin: 0; padding-top: 8px; flex-direction: column; justify-content: flex-start; align-items: center;
}
html.cailed-nav-page.cailed-sidebar-page.cailed-nav-compact #main .nav-logo { width: 44px; height: 44px; flex: 0 0 44px; }
html.cailed-nav-page.cailed-sidebar-page.cailed-nav-compact #main .nav-logo img {
    width: 44px; height: 44px; max-width: none; max-height: none; object-fit: cover; object-position: left center;
}
html.cailed-nav-page.cailed-sidebar-page.cailed-nav-compact #main .cailed-nav-toggle { position: static; margin-top: 5px; }
html.cailed-nav-page.cailed-sidebar-page.cailed-nav-compact #main .cailed-brand-copy,
html.cailed-nav-page.cailed-sidebar-page.cailed-nav-compact #main .cailed-nav-caption,
html.cailed-nav-page.cailed-sidebar-page.cailed-nav-compact #main .cailed-nav-label,
html.cailed-nav-page.cailed-sidebar-page.cailed-nav-compact #main .cailed-full-label { display: none; }
html.cailed-nav-page.cailed-sidebar-page.cailed-nav-compact #main .cailed-short-label { display: inline; }
html.cailed-nav-page.cailed-sidebar-page.cailed-nav-compact #main .lottery-main-nav { margin-top: 8px; }
html.cailed-nav-page.cailed-sidebar-page.cailed-nav-compact #main .nav > li > a {
    justify-content: center; gap: 0; padding: 0; height: 40px; line-height: 40px;
}
html.cailed-nav-page.cailed-sidebar-page.cailed-nav-compact #main .lottery-main-nav > .cailed-nav-parent > a::after { display: none; }
html.cailed-nav-page.cailed-sidebar-page.cailed-nav-compact #main .cailed-submenu-group {
    margin: 3px 5px 7px; padding: 3px 0; border-left: 0; border-radius: 5px; background: #f9f0e3;
}
html.cailed-nav-page.cailed-sidebar-page.cailed-nav-compact #main .cailed-submenu-group .lottery-sub-nav > li > a {
    height: 30px; line-height: 30px; padding: 0; font-size: 13px;
}

html.cailed-nav-page.cailed-sidebar-page.cailed-nav-compact #main .cailed-utility-nav .cailed-video-icon { display: inline-flex; }

/* Leave room for the original logo and toggle in the narrower expanded menu. */
html.cailed-nav-page.cailed-sidebar-page:not(.cailed-nav-compact) #main .nav-brand { height: 80px; }
html.cailed-nav-page.cailed-sidebar-page:not(.cailed-nav-compact) #main .nav-logo { justify-content: flex-start; }
html.cailed-nav-page.cailed-sidebar-page:not(.cailed-nav-compact) #main .cailed-nav-toggle { bottom: 2px; }

/* Each lottery owns its disclosure state, independent of the active chart. */
html.cailed-nav-page.cailed-sidebar-page #main .cailed-submenu-group[hidden] { display: none !important; }
html.cailed-nav-page.cailed-sidebar-page #main .lottery-main-nav > .cailed-nav-parent > a[aria-expanded="false"]::after { transform: rotate(-45deg); }
