:root {
    color-scheme: light only;
}

@font-face {
    font-family: KOMIKAH;
    src: url(/comics_assets/fonts/KOMIKAH.eot);
    src: url(/comics_assets/fonts/KOMIKAH.svg);
    src: url(/comics_assets/fonts/KOMIKAH.ttf);
    src: url(/comics_assets/fonts/KOMIKAH.woff);
    src: url(/comics_assets/fonts/KOMIKAH.woff2);
}

html, body {
    overscroll-behavior-y: none;
    -webkit-text-size-adjust: none !important;
    -moz-text-size-adjust: none !important;
    text-size-adjust: none!important;
    font-size: 16px;
    line-height: 1.5;
}

body {
    -webkit-touch-callout: none !important; /* hides iOS long-press menu */
    user-select: none !important;
    -webkit-user-select: none !important;
    background-color: #000;
    padding: 0px;
    margin: 0px;
    color: #fff;
    font-family: Effrar, helvetica, arial;    
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}


.panel a {
    color: inherit;
    text-decoration: none;
}


.translated {
    color: #fff;
    position: absolute;
    z-index: 3;
    box-sizing: border-box;
    border-radius: 6px;
    text-align: left;
    width: 100%;
    left: 0px;
    top: 0px;
    background-color: #000;
    -webkit-animation-duration: 0.3s;
    -webkit-animation-name: fadeIn;
    opacity:0;
    animation-fill-mode: forwards;
}

.translated .word {
    padding:3%;
    text-align: center;
}

.translated-note {
    border-top:1px solid rgba(0, 250, 250, 1);
    padding:3%;
    text-align:center;
}

.translated-note:first-letter{
    text-transform: capitalize
}

.close-translation {
    position: absolute;
    right: 5px;
    top: 0px;
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid rgba(0, 250, 250, 1);
    padding: 3px 4px 4px 4px;
    display: inline-block;
    -webkit-transform: scale(1, .8);
    -moz-transform: scale(1, .8);
    -ms-transform: scale(1, .8);
    -o-transform: scale(1, .8);
    transform: scale(1, .8);
    height: 24px;
    width: 24px;
    text-align: center;
}

p::selection {
    background: rgba(0, 250, 250, 1); /* WebKit/Blink Browsers */
    color: #000000;
}

p::-moz-selection {
    background: rgba(0, 250, 250, 1); /* Gecko Browsers */
    color: #000000;
}

p {
    cursor: pointer;
}

.copy {
    padding: 0px;
    margin: 0px;
    z-index: 3;
    box-sizing: border-box;
    position: absolute;
    color: #000;
}

.no-translate {
    pointer-events: none;
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    -khtml-user-select: none; /* Konqueror HTML */
    -moz-user-select: none; /* Old versions of Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none;
}

.reading {
    color: #ff0000;
}

.choose-path {
    padding: 1em;
    background-color: #0f0;
    cursor: pointer;
}

.panel {
    background-color: #000;
    position: absolute;
    display: none;
    transform-origin: top left;
}

.panel.down,
.panel.up,
.panel.down *,
.panel.up * {
    pointer-events: none;
    user-select: none;
}

.pages {
    width: 100vw;
    height: 100vh;
}

img {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.5);
    image-rendering: auto;
}

.panel.new {
    z-index: 100;
    position: absolute;
}

.panel.right,
.panel.left {
    display: block;
}

.full-img {
    position: relative;
    float: left;
    width: 100%;
    pointer-events: none
}

.js-book {
    width: 18%;
    margin-right: 2%;
    position: relative;
    float: left;
}

.js-book img {
    width: 100%;
    position: relative;
    float: left;
}

.book {
    width: 100%;
    height: 100%;
    position: fixed;
    z-index: 1;
    background-color: #000;
}

.js-book-close {
    position: fixed;
    z-index: 101;
    right: 0px;
    top: 0px;
}

.book-text,
.play-pause,
audio {
    position: absolute;
    z-index: 999;
    cursor: pointer;
}

.play-pause img {
    width: 100%;
    position: relative;
    float: left;
}

p.book-text {
    margin: 0px;
}

.img.block {
    position: absolute;
    z-index: 2;
    box-sizing: border-box;
    display: block;
    opacity:0;
}

.img.block img {
    width:100%;
    height:100%;
}

p.copy {
    display: block;
    opacity:0;
    text-align:center;
}

.showing p.copy {

    /* for chrome and safari*/
    -webkit-animation-duration: 0.5s;
    -webkit-animation-name: fadeInLeft;

    /*for firefox*/
    -moz-animation-duration: 0.5s;
    -moz-animation-name: fadeInLeft;

    /* for opera*/
    -o-animation-duration: 0.5s;
    -o-animation-name: fadeInLeft;

    /* Standard syntax*/
    animation-duration: 0.3s;
    animation-delay:0.2s;
    animation-name: fadeInLeft;
    opacity:0;
    animation-fill-mode: forwards;
    animation-timing-function: ease-out;
    -webkit-animation-timing-function: ease-out;

}

.showing p.copy:nth-of-type(2) {
    animation-delay: 0.4s;
}

.showing p.copy:nth-of-type(3) {
    animation-delay: 0.6s;
}

.showing p.copy:nth-of-type(4) {
    animation-delay: 0.8s;
}

.showing p.copy:nth-of-type(5) {
    animation-delay: 1s;
}

.showing p.copy:nth-of-type(6) {
    animation-delay: 1.2s;
}

.showing p.copy:nth-of-type(7) {
    animation-delay: 1.4s;
}

.showing p.copy:nth-of-type(8) {
    animation-delay: 1.6s;
}

.showing .block.img {
    /* for chrome and safari*/
    -webkit-animation-name: fadeInRight;
    animation-name: fadeInRight;
    animation-duration: 0.3s;
    animation-delay:0.2s;
    opacity:0;
    animation-fill-mode: forwards;
    animation-timing-function: ease-out;
    -webkit-animation-timing-function: ease-out;
}

.showing .block.img:nth-of-type(2) {
    animation-delay: 0.4s;
}

.showing .block.img:nth-of-type(3) {
    animation-delay: 0.6s;
}

.showing .block.img:nth-of-type(4) {
    animation-delay: 0.8s;
}
.showing .block.img:nth-of-type(5) {
    animation-delay: 1s;
}
.showing .block.img:nth-of-type(6) {
    animation-delay: 1.2s;
}
.showing .block.img:nth-of-type(7) {
    animation-delay: 1.4s;
}
.showing .block.img:nth-of-type(8) {
    animation-delay: 1.6s;
}

@-webkit-keyframes fadeInRight {
    from {
        opacity: 0;
        -webkit-transform: translate3d(50%, 0, 0);
        transform: translate3d(50%, 0, 0)
    }
    to {
        opacity: 1;
        -webkit-transform: translateZ(0);
        transform: translateZ(0)
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        -webkit-transform: translate3d(50%, 0, 0);
        transform: translate3d(50%, 0, 0)
    }
    to {
        visibility: visible;
        opacity: 1;
        -webkit-transform: translateZ(0);
        transform: translateZ(0)
    }
}

@-webkit-keyframes fadeInLeft {
    from {
        opacity: 0;
        -webkit-transform: translate3d(-50%, 0, 0);
        transform: translate3d(-50%, 0, 0)
    }
    to {
        opacity: 1;
        -webkit-transform: translateZ(0);
        transform: translateZ(0)
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        -webkit-transform: translate3d(-50%, 0, 0);
        transform: translate3d(-50%, 0, 0)
    }
    to {
        opacity: 1;
        -webkit-transform: translateZ(0);
        transform: translateZ(0)
    }
}

@-webkit-keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}


/* menu */
.menu {
    height: 30px;
    position:fixed;
    bottom: 0px;
    color:#f00;
    width: 100%;
    background-color:#000;
    border-top:1px solid #ccc;
    z-index:10;
}

.table {
    display: table;
    width:300px;
    margin:auto;
    position: relative;
    height: 100%;
    vertical-align: center;
}

.table-cell {
    display: table-cell;
    vertical-align: middle;
    height:100%;
}

.menu img {
    margin-top:5px;
}

.js-sidebar, .js-next, .js-prev {
    font-size: 2em;
    position: absolute;
    right: 8px;
    color: #bbbbbb;
    text-decoration: none;
    line-height: 0;
    background-color: transparent;
    border: 0px;
    padding:0px;
}

.js-sidebar {
    top: 0px;
    display: inline-block;
    height: 100%;
}

.js-next {
    position: absolute;
    right: 20px;
    width: 30px;
    cursor: pointer;
    opacity: .7;
    transition: opacity 0.3s;
}

.js-prev {
    position: absolute;
    left: 20px;
    width: 30px;
    cursor: pointer;
    opacity: .7;
    transition: opacity 0.3s;
}

.js-next:hover,
.js-prev:hover {
    opacity: 1;
}

.js-next img,
.js-prev img {
    position: relative;
    float: left;
    width: 100%;
}

.volume-container {
    margin: auto;
    width: 193px;
    padding: 20px;
    border-radius: 100px;
    background-image: url('images/bgtransparent.png');
}

.volume-container img {
    width: 40px;
    vertical-align: middle

}

.js-volume {
    vertical-align: middle;
}

input[type=range] {
    -webkit-appearance: none; /* Hides the slider so that custom slider can be made */
    width: 100px; /* Specific width is required for Firefox. */
    background: transparent; /* Otherwise white in Chrome */
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
}

input[type=range]:focus {
    outline: none; /* Removes the blue border. You should probably do some kind of focus styling for accessibility reasons though. */
}

input[type=range]::-ms-track {
    width: 100px;
    cursor: pointer;
    width: 100%;

    /* Hides the slider so custom styles can be added */
    background: transparent;
    border-color: transparent;
    color: transparent;
}

/* Special styling for WebKit/Blink */
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    border: 3px solid #306e01;
    height: 36px;
    width: 16px;
    border-radius: 60px;

    background: #8ee458;
    cursor: pointer;
    margin-top: -16px; /* You need to specify a margin in Chrome, but in Firefox and IE it is automatic */
    box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d; /* Add cool effects to your sliders! */
}

/* All the same stuff for Firefox */
input[type=range]::-moz-range-thumb {
    box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
    border: 1px solid #000000;
    height: 36px;
    width: 16px;
    border-radius: 3px;
    background: #ffffff;
    cursor: pointer;
}

/* All the same stuff for IE */
input[type=range]::-ms-thumb {
    box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d;
    border: 1px solid #000000;
    height: 36px;
    width: 16px;
    border-radius: 3px;
    background: #ffffff;
    cursor: pointer;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100px;
    height: 3px;
    cursor: pointer;

    background: #000000;
    border-radius: 1.3px;
    border: 0.2px solid #010101;
}

input[type=range]:focus::-webkit-slider-runnable-track {
    background: #000000;
}

input[type=range]::-moz-range-track {
    width: 100px;
    height: 3px;
    cursor: pointer;

    background: #000000;

}

input[type=range]::-ms-track {
    width: 100px;
    height: 3px;
    cursor: pointer;
    background: transparent;
    border-color: transparent;
    border-width: 16px 0;
    color: transparent;
}

input[type=range]::-ms-fill-lower {
    background: #000000;

}

input[type=range]:focus::-ms-fill-lower {
    background: #3071a9;
}

input[type=range]::-ms-fill-upper {
    background: #000000;

}

input[type=range]:focus::-ms-fill-upper {
    background: #000000;
}

.h-flip {
    transform: scaleX(-1);
}

.v-flip {
    transform: scaleY(-1);
}

.h-flip.v-flip {
    transform: scale(-1);
}

.green-btn {
    box-shadow:inset 0px 1px 0px 0px #caefab;
    background:linear-gradient(to bottom, #77d42a 5%, #5cb811 100%);
    background-color:#77d42a;
    border-radius:6px;
    border:2px solid #268a16;
    display:inline-block;
    cursor:pointer;
    color:#000000;
    box-sizing:border-box;
    font-weight:bold;
    /*padding:6px 25px;*/
    text-decoration:none;
    text-shadow:0px 1px 0px #aade7c;
    text-align:center;
    -webkit-tap-highlight-color:transparent;
    display:flex;
    align-content: center;
}
.green-btn:hover {
    background:linear-gradient(to bottom, #5cb811 5%, #77d42a 100%);
    background-color:#5cb811;
    -webkit-tap-highlight-color:transparent;
}

p.white-box {
    border:2px solid #000;
    background-color:#fff;
    padding: 0;
    text-align:center;
    display:block;
    align-content: center;
}

.showing .white-box {

    /* for chrome and safari*/
    -webkit-animation-duration: 0.5s;
    -webkit-animation-name: fadeInTop;

    /*for firefox*/
    -moz-animation-duration: 0.5s;
    -moz-animation-name: fadeInTop;

    /* for opera*/
    -o-animation-duration: 0.5s;
    -o-animation-name: fadeInTop;

    /* Standard syntax*/
    animation-duration: 0.3s;
    animation-delay:0.2s;
    animation-name: fadeInTop;
    opacity:0;
    animation-fill-mode: forwards;

}

.translation {
    display: none;
    position: absolute;
    top: 102%;
    width: 106%;
    left: 0%;
    background-color: #000;
    color: #fff;
    padding: 3%;
    box-sizing: border-box;
    border-radius: 6px;
    cursor: default;
}

.showing-translation {
    -webkit-animation-duration: 0.3s;
    -webkit-animation-name: fadeIn;
    opacity: 0;
    animation-fill-mode: forwards;
}

.entire-sentence-container {
    width: 100%;
    height: 100%;
    position: fixed;
    z-index: 1;
    left: 0px;
    top: 0px;
    bottom: 0px;
    right: 0px;
}

.icon-container {
    display: flex;
    width: 100%;
    top: 100%;
    position: absolute;
    justify-content: center;
    gap: 1vh;
}

.icon-container:first-child {

}

.translate-icon,
.speak-icon {
    width: 24px;
    height:24px;
    padding: 0.5vh;
    border-radius: 50%;
    background-color:#fff;
    border: 2px solid #000;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.translate-icon:hover,
.speak-icon:hover,
.translate-icon:focus,
.speak-icon:focus {
    background-color: #00fafa;
}

.speak-icon {
    display: none;
}

.audio-on .speak-icon {
    display: inline;
} 

.entire-sentence-container span {
    display: block;
}

.entire-sentence-content {
    background-color:#fff;
    border-radius:8px;
    padding:10px;
    width: min(600px, 90vw);
    color:#000;
    font-family: Arial;
    text-align:center;
    max-width: calc(90% - 10px);
}

.entire-sentence-content a:link,
.entire-sentence-content a,
.entire-sentence-content a:visited {
    text-decoration:none;
    color: rgb(0 113 250);
}
.entire-sentence-content a:hover,
.entire-sentence-content a:focus,
.entire-sentence-content a:focus-visible {
    text-decoration:underline;
}


.native-close {
    margin-top: 10px;
    padding: 10px;
    background-color: #000;
    border-radius: 30px;
    width: 20px;
    height: 20px;
    text-align: center;
    border: 2px solid #fff;
    align-content: center;
    line-height: 0px;
}

.native-close:hover {
    cursor:pointer;
    background-color: #343434;
}

@-webkit-keyframes fadeInLeft {
    from {
        opacity: 0;
        -webkit-transform: translate3d(0%, -50%, 0);
        transform: translate3d(0%, -50%, 0)
    }
    to {
        opacity: 1;
        -webkit-transform: translateZ(0);
        transform: translateZ(0)
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        -webkit-transform: translate3d(0%, -50%, 0);
        transform: translate3d(0%, -50%, 0)
    }
    to {
        opacity: 1;
        -webkit-transform: translateZ(0);
        transform: translateZ(0)
    }
}

.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width: 0;
    overflow-x: hidden;
    transition: .5s;
    z-index: 1050;
    background-color: rgba(0, 0, 0, .5);
    box-sizing: border-box;
    font-family: 'Liberation Sans';
}

.sidebar.show {
    width: 100%;
}

.sidebar-content {
    position: absolute;
    top: 0;
    right: 0;
    width: min(410px, 90vw);
    height: 100%;
    background: #fff;
    box-shadow: -5px 0 15px rgba(0, 0, 0, .1);
    overflow-y: auto;
    padding:3vh 3vw;
    box-sizing: border-box;
    font-size:1.6em;
}

.sidebar-content a:link,
.sidebar-content a:visited {
    color:#000;
    display: inline-block;
    width:73%;
    margin-bottom:3vh;
    text-decoration: none;
}

a.close-sidebar:link {
    position:absolute;
    right:3vw;
    top:3vh;
    cursor:pointer;
    font-size:1.6em;
    width:auto;
}


.js-sidebar:hover,
.js-next:hover,
.js-prev:hover {
    cursor:pointer;
    color:#fff;
}

.highlight,
span:focus,
span:focus-visible {
    background: rgba(0, 250, 250, 1);
    color: #000000;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

/* Hide default HTML checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:focus + .slider {
    outline: 3px solid #2196F3;
}

input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.sidebar {
    color:#000;
}

.alert {
    position: fixed;
    top: 10px;
    right: 10px;
}
.moving {
    transition: top 600ms ease-out;
}
