/* General */
#wrapper { background: #daf1eb; padding: 0 0 93px; position: relative; }

/* Banner */
#banner { background: #41bfb4; border-top: 2px solid #000; border-bottom: 2px solid #000; height: 198px; position: relative; overflow: visible; margin: 55px 0 0; }
#banner div { max-width: 100%; width: max-content; width: -webkit-max-content; text-align: center; margin: auto; text-transform: uppercase; position: absolute; top: 50%; bottom: 0; left: 32%; transform: translateY( -50% ) translateX( -50% ); }
#banner div:before { content: ' '; display: block; width: 440px; height: 261px; background: no-repeat url( '../../images/pages/comics/bg/dr-hen.png' ); position: absolute; right: -440px; bottom: -50px; }
#banner p { margin: 0; font: 500 16pt/1.2 'Creative Block', 'Arial', sans-serif; color: #030303; }

/* Main content */
main.container { padding: 40px 0 0; width: 864px; text-align: center; }
#search { border: 1px solid #818584; width: 335px; position: relative; background: #fff; border-radius: 21px/23px; margin: auto; padding: 0 31px 0 0; box-sizing: border-box; max-width: 90%; }
#search:after { content: '\e803'; color: #42bfb5; display: block; font: 13pt 'halza', sans-serif; position: absolute; right: 12px; top: 10px; }
main [type="text"] { padding: 14px 22px; width: 100%; background: 0; border: 0; }
main section { display: flex; flex-wrap: wrap; margin: 41px 0 0; position: relative; }
main section.loading:before { content: ' '; display: block; position: absolute; z-index: 1; top: 0; right: 0; bottom: 0; left: 0; background: #daf1ebc7; }
main section.loading:after { content: ' '; display: block; position: absolute; top: 50%; left: 50%; z-index: 2; transform: translateX( -50% ) translateY( -50% ); width: 40px; height: 40px; border-radius: 50%; border: 3px dashed #000; animation: turn 2s infinite; transform-origin: 50%; }
@keyframes turn {
	0% { transform: rotate( 0deg ); }
	100% { transform: rotate( 360deg ); }
}
main a { flex: 0 calc( ( 100% - 104px ) / 4 ); margin: 0 13px 26px; display: block; }
main h3 { font: 700 12pt 'Arial', sans-serif; letter-spacing: -.25px; margin: 0 0 7px; height: 36px; overflow: hidden; }
main img { box-shadow: 0 4px 3px 1px #aeaeae80; }
main p { text-align: center; margin: 30px auto 0; font: 500 16pt/1.2 'Creative Block', 'Arial', sans-serif; color: #030303; }

/* Popup */
#popup { background: #daf1eb; position: absolute; top: -60px; left: 0; right: 0; bottom: 0; z-index: 999; display: none; text-align: center; padding: 57px 0; box-sizing: border-box; }
#popup .container { width: 750px; max-width: 94%; }
#popup.large .container { width: calc( 100vw - 180px ); max-width: 94%; }
#popup .container > aside { margin: 0 0 0 auto; display: block; width: max-content; width: -webkit-max-content; }
#popup .container > aside:before { content: '\00d7'; display: block; font-weight: 700; font-size: 35pt; border: 1.5px solid #424143; color: #424143; width: 44px; height: 44px; line-height: 44px; text-align: center; cursor: pointer; transition: all .4s; }
#popup .container > aside:hover:before { background: #424143; color: #daf1eb; }
#popup h2 { margin: 20px 0; color: #030303; font: 700 18pt/1.2 'Creative Block', 'Arial', sans-serif; }
#book { position: relative; display: inline-block; }
#book button { position: absolute; top: 50%; transform: translateY( -50% ); left: 40px; z-index: 999; border: 0; background: 0; }
#book #button-previous { display: none; }
#book #button-next { left: auto; right: 40px; }
#book button:before { cursor: pointer; transition: all .4s; content: '\e801'; font: 700 18pt/1 'halza', sans-serif; display: block; background: #f3d54e; border: 1px solid #f3d54e; border-radius: 50%; color: #303d48; width: 40px; height: 40px; text-align: center; line-height: 40px; }
#book button:hover:before { background: 0; color: #f3d54e; }
#book #button-next:before { content: '\e802'; }
#enlarge { display: block; position: absolute; bottom: 0; right: 131px; z-index: 101; cursor: pointer; width: 40px; height: 40px; background: no-repeat url( '../../images/pages/comics/bg/enlarge.png' ); }
.large #enlarge { right: 222px; }
#book .bb-bookblock { width: 735px; height: 367.5px; }
.large #book .bb-bookblock {  width: calc( 100vw - 180px ); height: calc( 50vw - 90px ); }
#book .bb-item { position: relative; background: 0; }
.bb-item:after { content: ' '; display: block; clear: both; }
.bb-item img, .bb-page img { float: left; width: 50%; height: 100%; }
.large #book .bb-item img, .large #book .bb-page img { width: calc( 50vw - 90px ); }
#filler { width: 25%; height: 100%; float: left; }
#last-filler-one { width: 0; height: 100%; float: left; }
#last-filler-two { width: 50%; height: 100%; float: left; }
.bb-page { backface-visibility: visible; }
#book .bb-content, #book .bb-overlay, #book .bb-flipoverlay { background: 0; }
.bb-item span { display: block; position: absolute; left: 0; bottom: -33px; font-weight: 700; font-size: 16pt; }
.bb-item span:last-of-type { right: 0; left: auto; }
.bb-item[data-number="1"] span { left: 0; text-align: center; }
.bb-item.even span:last-of-type { left: 0; }
#popup nav { margin: 73px auto 0; position: relative; width: 600px; max-width: 90%; }
#popup nav:after { display: block; content: ' '; clear: both; }
#popup nav > a { float: left; background: #f3d54e; box-sizing: border-box; border-radius: 5px; padding: 14px 20px; color: #434343; font-weight: 600; font-size: 12pt; }
#popup nav div { position: absolute; top: 0; left: 50%; transform: translateX( -50% ); }
#popup nav div + a { float: right; width: 158px; }

@media (max-width: 970px) {
	#banner { margin: 200px 0 0; height: auto; }
	#banner div { transform: none; position: relative; padding: 20px; left: auto; top: auto; box-sizing: border-box; }
	#banner div:before { bottom: 100%; right: 50%; transform: translateX( 50% ); background-size: 100%; width: 294px; height: 177px; }
	h1 { font-size: 35pt; }
	#banner div br { display: none; }
}

@media (max-width: 920px) {
	#book .bb-bookblock { width: 500px; height: 250px; }
}

@media (max-width: 790px) {
	main a { flex: 0 calc( ( 100% - 78px ) / 3 ); }
}

@media (max-width: 660px) {
	#book:after { clear: both; display: block; content: ' '; }
	#book .bb-bookblock { width: 550px; margin-left: -275px; height: 275px; }
	.mobile-filler { float: left; width: 50%; height: 100%; }
	.bb-item span { bottom: -27px; font-size: 13pt; margin: 0 0 0 50%; }
	.bb-item span:last-of-type { left: 0; }
	#enlarge { width: 25px; height: 25px; background-size: 100%; position: static; margin: 49px auto 0; }
	#book button { transform: none; left: -73px; top: 121px; }
	#book #button-next { right: -73px; }
	#book button:hover:before { background: #f3d54e; color: #303d48; }
	#enlarge { display: none; }
}

@media (max-width: 560px) {
	main.container { padding: 45px 0 0; }
	main a { flex: 0 calc( ( 100% - 52px ) / 2 ); }
	
	#popup nav > a, #popup nav div + a { float: none; display: block; margin: auto; width: 164px; max-width: 100%; }
	#popup nav div { position: static; transform: none; margin: 20px 0; }
}

@media (max-width: 470px) {
	main a { margin: 0 7px 26px; flex: 0 calc( ( 100% - 28px ) / 2 ); }
	main h3 { font-size: 11pt; }
}

@media (max-width: 430px) {
	#book button { left: -25px; }
	#book #button-next { right: -25px; }
}