@font-face {
  font-family: 'STKaiti';
  src: url('///android_asset/STKaiti.ttf') format('truetype'); /* Safari, Android, iOS */
}

body {
  /*font-family: -android-system, sans-serif;*/
  margin: 0 auto;
  background-color: rgb(255, 255, 221); /* #ffffdd */
  padding: 1em;
  font-size: 16px;
}

input {
  font-size: 1em;
}

h1, h2 {
  text-align: center;
}

.page {
  display: none;
}

.model {
  position: fixed;
  top: 0;
  left: 0;
  display: none;
  width: 80%;
  height: 100%;
  padding: 30% 10% 10%;
  background-color: rgba(0, 0, 0, 0.8);
}

.model .content {
  width: 90%;
  background-color: rgb(255, 255, 221);
  padding: 5%;
}

#page-front {
  display: block;
}

.menu, .custommenu {
  width: 100%;
  height: 2.8em;
}

.pianomenu {
  width: 100%;
  height: 2.8em;
}

.fixmenu {
  position: fixed;
  z-index: 1;
  width: 100%;
  height: 2.8em;
  top: 0;
  left: 0;
  background-color: rgb(255, 255, 221);
  border-bottom: 1px solid #eee;
}

.button {
  display: block;
  line-height: 1.4em;
  border: 1px solid #f84;
  border-radius: 5px;
  text-align: center;
  cursor: pointer;
  color: #f84;
  user-select:none;
  text-decoration: none;
}

.button-active {
  background-color: #f84;
  color: rgb(255, 255, 221);
}

.button-inline {
  display: inline-block;
  padding: 0 0.5em;
}

.button-fullwidth {
  margin: 1em auto;
  width: 100%;
  padding: 0.5em 0;
  clear: both;
}

.button-two {
  padding: 0.35em 0.3em 0.2em;
  margin: 0.5em 0.4em 0.5em 0.5em;
  width: 2.5em;
  float: left;
  line-height: 1em;
}

.button-one {
  padding: 0.35em 0.3em 0.2em;
  width: 1em;
  float: right;
  margin: 0.5em 0.4em 0.5em 0.5em;
  line-height: 1em;
}

.button-right {
  padding: 0.35em 0.3em 0.2em;
  float: right;
  margin: 0.5em 0.4em 0.5em 0.5em;
  line-height: 1em;
}

.center {
  text-align: center;
}

.content {
  font-size: 1em;
  margin-bottom: 1em;
}

.content img {
  display: block;
  width: 100%;
}

@media screen and (min-width: 414px) {
  .content img {
    width: 414px;
    margin: 0 auto;
  }
}

textarea {
  width: 100%;
  height: 5em;
}

a {
  line-height: 2em;
}

/*
@media screen and (min-width: 1300px) {
    body {
        max-width: 1600px;
        font-size: 32px;
    }
}*/

.popup-window {
  z-index: 1000;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
}

.popup-frame {
  position: fixed;
  z-index: 1001;
  top: 30%;
  left: 10%;
  width: calc(80% - 4em);
  max-height: 40%;
  overflow-y: auto;
  text-align: center;
  background-color: #fff;
  border: 1px solid #888;
  font-size: 16px;
  padding: 3em 2em;
}

.popup-frame .button {
  width: 5em;
  margin: 1em auto 0 auto;
}

#comment-rule .popup-frame {
  text-align: left;
  top: 10%;
  max-height: 80%;
}

.next {
  float: right;
}

.prev {
  float: left;
}

/* 评论 */
.comments {
  margin-top: 5em;
  margin-bottom: 2em;
  border-top: 1px solid #888;
  padding-top: 1em;
  padding-bottom: 1%;
  clear: both;
}

.comment {
  padding: 0.5em 0;
  border-bottom: 1px solid #ccc;
}

.child-comment {
  margin-left: 2em;
}

.comment-praise {
  float: right;
  color: #f84;
  width: 4em;
  text-align: right;
}

.comment-toolbar {
  display: none;
  position: fixed;
  left: 0;
  bottom: 0;
  width: 98%;
  padding: 1%;
  background-color: rgb(255, 255, 221);
}

.comment-toolbar input {
  width: calc(98% - 4em);
  padding: 0.3em 1%;
}

.button-submit {
  width: 3em;
  float: right;
  padding: 0.2em;
}

.comment-reply {
  float: right;
  color: #f84;
  width: 2em;
}

.notice {
  margin-top: 0.5em;
  padding-bottom: 0.5em;
  border-bottom: 1px solid #888;
}

.notice div {
  text-align: right;
  color: #800;
  font-size: 0.8em;
}
/* 评论：END */

/* 字典 */
.dict {
  display: none;
  clear: both;
  padding: 0 1%;
  background-color: rgb(255, 255, 221);
}

.dict .toolbar {
  min-height: 2.5em;  
}

.button-query, .button-confirm, .button-cancel {
  width: 3em;
  float: right;
  padding: 0.2em;
  margin: 0 0.1em 0;
}

.dict input {
  width: calc(100% - 8.5em);
  padding: 0.2em;
  margin: 0.1em 0.1em 0;
}

.dict-content {
  height: 400px;
  overflow: scroll;
  clear: both;
  padding: 0 1%;
  background-color: rgb(255, 255, 221);
  border-bottom: 2px solid #444;
}

.dict-content dd {
  margin-left: 0;
}

.dict-content iframe {
  width: 100%;
  height: 100%;
}
/* 字典：END */

/* TTS */
.tts {
  min-height: 2.5em;
  background-color: rgb(255, 255, 221);
  clear: both;
  display: none;
  border-bottom: 1px solid #eee;
}
/* TTS: END */

/* 设置页面 */
.settings input {
  float: right;
}

.setting-item {
  padding-bottom: 0.5em;
  border-bottom: 1px solid #eee;
  margin-bottom: 0.5em;
}

/* 国学导航注释 */
.q {
    color: #008080;
}

.h {
    color: #FF0000;
}

.l {
    color: #000080;
}

.z {
    color: #FF00FF;
}

/* 汉川草庐注释 */
.style7 {
    font-size: 85%;
    color: #069;
}

/* loading animation */
ul#progress {
    list-style: none;
    width: 125px;
    margin: 0 auto;
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 0;
}

ul#progress li {
    /* Style your list */
  float: left;
    position: relative;
    width: 15px;
    height: 15px;
    border: 1px solid #fff;
    border-radius: 50px;
    margin-left: 10px;
    border: 1px solid #f84;
    background: rgb(255, 255, 221);
}

ul#progress li:first-child {
    margin-left: 0;
} /* Remove the margin first li element */

.ball {
    /* Style your ball and set the animation */
  background-color: #f84;
    background-image: -webkit-linear-gradient(90deg, #f84 25%, rgb(255, 255, 221));
    width: 15px;
    height: 15px;
    border-radius: 50px;
    -webkit-transform: scale(0);
    -webkit-animation: loading 5s linear forwards infinite;
}

.pulse {
    /* Style your second ball to create the amazing effects */
  width: 15px;
    height: 15px;
    border-radius: 30px;
    border: 1px solid #f84;
    box-shadow: 0 0 5px #f84;
    position: absolute;
    top: -1px;
    left: -1px;
    -webkit-transform: scale(0);
    -webkit-animation: pulse 5s ease-out infinite;
}

/* Control Layers */
#layer1 {
    -webkit-animation-delay: 0.5s;
}

#layer2 {
    -webkit-animation-delay: 1s;
}

#layer3 {
    -webkit-animation-delay: 1.5s;
}

#layer4 {
    -webkit-animation-delay: 2s;
}

#layer5 {
    -webkit-animation-delay: 2.5s;
}

#layer7 {
    -webkit-animation-delay: 1.5s;
}

#layer8 {
    -webkit-animation-delay: 2s;
}

#layer9 {
    -webkit-animation-delay: 2.5s;
}

#layer10 {
    -webkit-animation-delay: 3s;
}

#layer11 {
    -webkit-animation-delay: 3.5s;
}

@-webkit-keyframes loading {
    0% {
        -webkit-transform: scale(0,0);
    }

    20% {
        -webkit-transform: scale(1,1);
    };
}

@-webkit-keyframes pulse {
    0% {
        -webkit-transform: scale(0);
        opacity: 0;
    }

    4% {
        -webkit-transform: scale(1);
        opacity: 0.5;
    }

    10% {
        -webkit-transform: scale(1.75);
        opacity: 0;
    }

    20% {
        -webkit-transform: scale(0);
        opacity: 0;
    };
}
/* end of loading animation */

.search-keyword {
  background-color: #ff0;
}

.search-toolbar {
  width: 98%;
  padding: 1%;
  background-color: rgb(255, 255, 221);
}

.search-toolbar input {
  width: calc(98% - 4em);
  padding: 0.3em 1%;
  border: 1px solid #888;
}

.search-result-item {
  margin-top: 1em;
  border-top: 1px solid #888;
  padding-top: 1em;
}

.search-result-item a {
  text-decoration: none;
}

/* bookmarks */
.bookmarks .content ul {
  list-style-type: none;
  padding: 0;
  border-bottom: 1px solid #888;
}

.bookmarks .content li {
  padding: 0.5em;
  border-top: 1px solid #888;
  color: #888;
  cursor: pointer;
}

.bookmarks .leaf {
  line-height: 2.6em;
}

/* flip mode */
.book-layer {
  left: 0;
  top: 0;
  padding: 0 1em;
  width: calc(100% - 2em);
  height: 100%;
  overflow: hidden;
  position: fixed;
  z-index: -1;
  background-color: rgb(255, 255, 221);
  box-shadow: 0 0 0 0 #000;
}

.book-layer.tbrl {
  width: 100%;
  height: calc(100% - 3em);
  overflow-x: scroll;
  writing-mode: tb-rl;
  padding: 2.5em 0 0.5em 0;
}

#book-layer-1 {
  z-index: -2;
}

.book-page-number {
  position: fixed;
  z-index: 1;
  opacity: 0.5;
  bottom: 10px;
  right: 10px;
  color: #888;
}
/* end of flip mode */

.book-name-tbrl {
  text-decoration: underline;
  text-decoration-style: wavy;
}

.bookshelf-title {
  text-align: center;
  background-color: #f84;
  color: #fff;
  padding: 0.3em;
}

.bookshelf-layer {
  overflow-x: scroll;
  overflow-y: hidden;
  padding: 0.5em;
  height: 12em;
}

.bookshelf-book {
  width: 7em;
  height: 10em;
  border: 1px solid #000;
  background-image: url("img/book.jpg");
  background-size: 100% 100%;
  float: left;
  margin: 1em;
}

.bookshelf-book a {
  writing-mode: tb-rl;
  color: #000;
  text-decoration: none;
  background-color: #fff;
  display: block;
  float: right;
  padding: 0.5em 0;
  margin: 1em;
}

.square-button {
  float: left;
  padding: 1rem;
  border: 1px solid #f84;
  color: #f84;
  border-radius: 5px;
  margin: 1rem 1rem 0 0;
}

.ai-comment {
  color: #f84;
}

.ai-translation {
  color: #4c4;
}