html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    background: #f5f5f5;
    overflow: hidden;
    font-family: system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.header_view {
    height: 56px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 20px;

    background: #fff;
    border-bottom: 1px solid #ddd;

    box-sizing: border-box;
}

#epub-layout {

    display: flex;

    height: calc(100vh - 56px);

}

#epub-outline {

    width: 260px;

    background: #ffffff;

    border-right: 1px solid #ddd;

    overflow-y: auto;

    box-sizing: border-box;

}

.outline-header {

    padding: 16px;

    font-size: 18px;

    font-weight: 600;

    border-bottom: 1px solid #ddd;

    background: #fafafa;

}

#toc-list {

    margin: 0;

    padding: 0;

    list-style: none;

}

#toc-list li {

    border-bottom: 1px solid #eee;

}

#toc-list a {

    display: block;

    padding: 12px 16px;

    color: #333;

    text-decoration: none;

}

#toc-list a:hover {

    background: #f5f5f5;

}

.header_left,
.header_center,
.header_right {
    display: flex;
    align-items: center;
}

.header_center {
    flex: 1;
    justify-content: center;
    overflow: hidden;
}

.header_center strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header_left a,
.header_right a {
    color: #1565c0;
    text-decoration: none;
    font-weight: 600;
}

#epub-viewer {

    flex: 1;

    height: 100%;

}

#debug {
    display: none;
}

#toc-toggle {
    margin-right: 12px;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 4px 8px;
}

#toc-toggle:hover {
    opacity: .7;
}

#epub-outline {
    transition: width .25s ease;
}

#epub-outline.collapsed {
    width: 0;
    min-width: 0;
    overflow: hidden;
}

@media (max-width: 768px) {

    #epub-layout {

        position: relative;

    }

    #epub-outline {

        position: fixed;

        top: 56px;

        left: -280px;

        width: 280px;

        height: calc(100vh - 56px);

        z-index: 1000;

        background: #fff;

        transition: left .25s ease;

        box-shadow: 2px 0 12px rgba(0, 0, 0, .20);

    }

    #epub-outline.mobile-open {

        left: 0;

    }

    #epub-viewer {

        width: 100%;

        flex: 1;

    }

}