* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 14px;
}

body {
  color: #4b4b4b;
  line-height: 1.4;
}
html,
body {
  font-family: "Comfortaa", cursive;
}

body.off {
  background: #4b4b4b;
}
body.off section {
  color: #fff;
}

ul, li {
  list-style-type: none;
}

a {
  color: #0097a7;
  text-decoration: none;
}

a:hover {
  color: #777;
}

select {
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("/static/img/arrow.svg");
  background-position: calc(100% - 10px) center;
  background-repeat: no-repeat;
  background-size: 12px 12px;
}

h1 {
  line-height: 2.2rem;
  font-size: 2.4rem;
}

button, dt, dd, strong, h1, h2, h3, h4, h5, h6 {
  font-family: "Baloo 2", cursive;
}

main {
  width: 1000px;
  margin: 0 auto;
  position: relative;
  box-sizing: border-box;
}
.label {
  font-family: "Baloo 2", cursive;
}
/* Button */
.btn,
a.btn {
  font-family: "Baloo 2", cursive;
  display: inline-block;
  padding: 0 1rem;
  height: 39px;
  box-sizing: border-box;
  border-radius: 4px;
  line-height: 42px;
  text-align: center;
  border: none;
  cursor: pointer;
}
.btn-primary,
a.btn-primary {
  color: #fff;
  background: #0097a7;
}
.btn-primary:hover,
a.btn-primary:hover {
  background: #368492;
}
.disabled {
  opacity: 0.5;
  pointer-events: none;
}
/* End Button */

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.pagination .btn {
  min-width: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* End pagination */

/* fake select */
.fake-hidden {
  opacity: 0;
  z-index: -1;
  position: absolute;
}
.fake-select {
  width: 220px;
  position: relative;
}
.fake-select .form-control {
  width: 100%;
  max-height: 40px;
  min-height: 39px;
  border-radius: 4px;
  padding: .65rem 1rem .5rem;
  box-sizing: border-box;
  outline: none;
  overflow: hidden;
  border: 1px solid #ddd;
  background: #fff;
  position: relative;
  display: block;
  cursor: pointer;
  text-transform: capitalize;
  white-space: nowrap;
}
.fake-select button.form-control {
  text-align: left;
  font-family: 'Comfortaa', cursive;
}
.fake-select .form-control + .form-control {
  display: none;
}
.fake-select .form-control::before {
  content: "";
  position: absolute;
  background: #fff url(/static/img/arrow.svg) center no-repeat;
  background-size: 16px 16px;
  height: 36px;
  width: 36px;
  border-radius: 36px;
  right: -1px;
  top: 0;
  bottom: 0;
  margin: auto;
  transition: all .25s linear;
}

.fake-select ul {
  border-radius: 4px;
  top: 40px;
  z-index: 9;
  position: absolute;
  width: 100%;
  overflow: auto;
  background: #fff;
  height: 220px;
  opacity: 0;
  display: none;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
  padding: 0.25rem;
}
.fake-select ul.ajax-loading {
  opacity: 1;
  display: block;
}
.fake-select.top ul {
  top: auto;
  bottom: 40px;
}
.fake-select.top .form-control::before {
  transform: rotate(-180deg);
}
.fake-select ul li {
  overflow-y: hidden;
  height: 30px;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  display: -webkit-box;
  border-radius: 2px;
  user-select: none; /* supported by Chrome and Opera */
  -webkit-user-select: none; /* Safari */
  -khtml-user-select: none; /* Konqueror HTML */
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* Internet Explorer/Edge */
}
.fake-select ul li.viewed {
  background-color: seashell;
}
.fake-select ul li:hover,
.fake-select ul li.active {
  color: #fff;
  background: #0097a7;
}
.fake-select ul li a,
.fake-select ul li h5 {
  color: #4b4b4b;
  display: block;
  text-transform: capitalize;
  line-height: 30px;
  height: 30px;
  font-family: 'Baloo 2', cursive;
  font-size: 1rem;
}
.fake-select ul li h5 {
  padding: 0 0.75rem;
}
.fake-select ul li.active a,
.fake-select ul li.active h5,
.fake-select ul li:hover a,
.fake-select ul li:hover h5 {
  color: #fff;
}

.fake-hidden:checked + .form-control + ul {
  opacity: 1;
  display: block;
}
.fake-hidden:checked + .form-control:before {
  transform: rotate(-180deg);
}
.fake-select.top .fake-hidden:checked + .form-control::before {
  transform: rotate(0);
}
.fake-select.has-after .fake-hidden:checked + .form-control::after {
  content: "";
  position: fixed;
  height: 100%;
  width: 100%;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 1;
  /* background: rgba(0,0,0,0.5); */
}

@media (max-width: 567px) {
  .fake-select ul li a {
    font-size: .85rem;
  }
}
/* End fake-select  */
.chapter-info {
  padding-top: 2rem;
  display: block;
}
.chapter-info,
.chapter-content {
  text-align: center;
  margin-bottom: 2rem;
}
.chapter-content + section {
  margin-bottom: 100px;
}

.chapter-content img {
  max-width: 100%;
  margin: 0 auto;
  display: block;
}

/* navbar-fix */
.navbar-fix {
  display: block;
  background: #402f3f;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99;
}
.navbar-fix main {
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.navbar-fix .pagination {
  margin: 0;
}
.navbar-fix .pagination .fake-select {
  margin: 0 0.75rem;
}
.navbar-fix .pagination .btn {
  min-width: 50px;
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-fix {
  display: flex;
  min-width: 200px;
}
.nav-fix.right {
  justify-content: flex-end;
}
.nav-fix .iconfont {
  margin-right: 0.25rem;
  font-size: 1.7rem;
}
.nav-fix-link {
  color: #fff;
  cursor: pointer;
  position: relative;
  background: no-repeat;
  border: 0;
  outline: none;
  display: flex;
  align-items: center;
}
.nav-fix-link .icon-nice {
  font-size: 1.5rem;
}
.nav-fix-link strong {
  font-family: "Baloo 2", cursive;
  font-size: 1.7rem;
}
.nav-fix.right .nav-fix-link {
  margin-left: 0.75rem;
}
.nav-fix .js-bookmark-notify {
  left: -15px;
  right: auto;
}

.back-to-top {
  display: block;
  position: fixed;
  z-index: 99;
  bottom: 5rem;
  right: 2rem;
  background: url(/static/img/arrow.svg) center no-repeat;
  background-size: 16px 16px;
  background-color: #ddd;
  width: 42px;
  margin: auto;
  transition: all 0.25s linear;
  transform: rotate(180deg);
}
.back-to-top:hover {
  background-color: #eee;
}

.toggle-show-less {
  margin-top: 1rem;
}
.toggle-show-less.sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
  height: auto;
  display: none;
  margin-top: 0.5rem;
}
.toggle-show-less .iconfont {
  font-size: 0.85rem;
  opacity: 0.75;
}

/* tooltip, Report, Add to Library */
.tooltip {
  position: absolute;
  top: -20px;
  background: mediumaquamarine;
  border-radius: 0.25rem;
  font-size: 0.85rem;
  white-space: nowrap;
  padding: 0.35rem 0.5rem 0.15rem 0.5rem;
  right: 0;
  opacity: 0;
  transition: all 0.25s linear;
  z-index: -1;
}
.tooltip.active {
  opacity: 1;
  top: -50px;
  z-index: initial;
}
.js-report {
  right: auto;
  left: 0;
}
.js-report.active {
  top: -25px;
}
.js-bookmark-notify {
  top: 0;
  right: -10px;
  color: #f07c78;
  background: #fff;
}
.js-bookmark-notify.active {
  top: -25px;
}
/* End tooltip */
@media (max-width: 859px) {
  .nav-fix {
    min-width: auto;
  }
}
@media (max-width: 735px) {
  .navbar-fix .pagination .btn {
    display: none;
  }
}
@media (max-width: 567px) {
  .navbar-fix main {
    flex-direction: initial;
  }
  .navbar-fix .nav-fix-link span {
    display: none;
  }
  .navbar-fix .nav-fix-link .tooltip {
    display: block;
  }
  .navbar-fix .nav-fix-link .js-report {
    left: -40px;
  }
  .navbar-fix .nav-fix-link .js-bookmark-notify {
    left: auto;
    right: 0;
  }
  .navbar-fix .nav-fix-link strong {
    display: flex;
    align-items: center;
    margin-right: 0.5rem;
    font-size: 12px;
    white-space: break-spaces;
    padding-left: 0;
    padding-right: 0;
  }
  .navbar-fix .nav-fix-link strong img {
    width: 40px;
  }
}
@media (max-width: 414px) {
}
@media (max-width: 360px) {
  .navbar-fix .pagination .fake-select {
    width: 160px;
  }
}
/* End navbar-fix */

@media (max-width: 1023px) {
  main {
    width: 100%;
    padding: 0 1rem;
  }
}

.ajax-loading {
  position: relative;
}
.ajax-loading::before,
.ajax-loading::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.ajax-loading::before {
  z-index: 10;
  background-color: rgba(255,255,255,0.9);
  width: 100%;
  height: 100%;
}
.ajax-loading::after {
  z-index: 11;
  height: 60px;
  width: 60px;
  margin: auto;
  background: url(/static/img/icons/loading.gif) no-repeat;
  background-size: 60px 60px;
  background-position: center center;
}