/*!
 * SiplPen
 * https://github.com/ImBearChild/SiplPen
 * MIT licensed
 *
 * Copyright (C) ImBearChild
 */

/*********************************************
 * BASE STYLES
 *********************************************/


* {
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}

*:focus {
	outline: none;
}

html {
	overflow: hidden;
}


html,
body {
	/* 同时设置来保证滚动 */
	padding: 0;
	margin: 0;
	height: 100%;
}

@font-face {
	font-family: 'SourceHanSerifWeb';
	src: url('../fonts/SourceHanSerifCN-Regular.woff2') format('woff2');
	font-display: swap;
	font-style: normal;
}

body {
	font-family: 'Noto Sans SC', 'Noto Sans TC', 'Source Han Sans CN', 'Source Han Sans TW', sans-serif;
	padding-bottom: 40px;
	padding-right: 10px;
	overflow-y: scroll;
	padding-left: 10px;
	padding-top: 20px;
	min-width: 800px;
	width: 100%;
	height: 100%;
	-webkit-transition: all 600ms;
	-moz-transition: all 600ms;
	-ms-transition: all 600ms;
	-o-transition: all 600ms;
	transition: all 600ms;
}

body.src-font {
	font-family: 'SourceHanSerifWeb', 'Noto Serif SC', 'Noto Serif TC', 'Source Han Serif CN', 'Source Han Serif TW', serif;
}

@media (max-width: 800px) {
	body {
		min-width: 240px;
	}
}

section {
	max-width: 600px;
	height: 100%;
	margin: auto;
}

section ::selection {
	background-color: rgb(100, 100, 100);
}

.yang section ::selection {
	background-color: rgb(230, 230, 230)
}


@media (max-width: 800px) {
	section {
		max-width: 600px;
		height: 100%;
		margin-left: 36px;
	}

}

header {
	font-weight: bold;
	font-size: 38px;
	word-wrap: break-word;
}

@media (max-width: 800px) {
	header {
		font-size: 30px;
	}
}

article {
	padding-bottom: 50px;
	line-height: 26px;
	margin-top: 22px;
	min-height: 90%;
	font-size: 18px;
	display: block;
	word-wrap: break-word;
	text-align: left;
	text-justify: inter-ideograph;
}

@media (max-width: 800px) {
	article {
		font-size: 1.1rem;
		line-height: 1.5rem;
	}
}

blockquote {
	border-left: 4px solid rgb(150, 150, 150);
	margin-left: -19px;
	padding-left: 15px;
	margin-right: 0;
}

@media (max-width: 800px) {
	blockquote {
		padding-left: 6px;
		margin-left: -10px;
	}
}

.no-overflow {
	overflow: hidden;
	display: block;
	height: 100%;
	width: 100%;
}

/* Used by the ui bubble to stop wrapping */
.lengthen {
	display: block;
	/* width: 300px;*/
	height: 100%;
}

.useicons {
	font-size: 20px !important;
}

.yang {
	background: #fdfdfd;
	color: #111;
}

.yin {
	background-color: #111;
	color: #f0f0f0;
}

.ui {
	position: fixed;
	padding: 20px;
	width: 65px;
	bottom: 0;
	left: 0;
	top: 0;
}

@media (max-width: 800px) {
	.ui {
		width: 32px;
		padding: 8px;
	}
}


.ui:hover button,
.ui:hover .about {
	opacity: .4;
}

.ui button:hover,
.ui .about:hover {
	opacity: 1;
}

.ui button,
.text-options button {

	-webkit-transition: opacity 400ms;
	-moz-transition: opacity 400ms;
	-ms-transition: opacity 400ms;
	-o-transition: opacity 400ms;
	transition: opacity 400ms;

	font-family: inherit;
	background: none;
	cursor: pointer;
	font-size: 20px;
	color: inherit;
	opacity: .1;
	padding: 0;
	height: 32px;
	width: 25px;
	border: 0;
}

a {
	text-decoration: none;
	color: rgb(150, 150, 150)
}

a:hover {
	text-decoration: underline;
}

div.clickable {
	text-decoration: none;
	color: rgb(150, 150, 150);
}

.overlay {

	position: fixed;
	display: none;
	height: 100%;
	width: 100%;
	z-index: 3;
	left: 0;
	top: 0;
	opacity: 0;
}

/*********************************************
 * MODAL
 *********************************************/

.yang .modal {
	background-color: rgba(240, 240, 240, .9);
	color: #111;
}


.modal {
	background-color: rgba(100, 100, 100, .9);
	margin-left: -200px;
	position: absolute;
	border-radius: 3px;
	/*height: 101px;*/
	padding: 15px;
	display: none;
	width: 400px;
	bottom: 10px;
	color: #fff;
	left: 50%;
	opacity: 0;
	transition: opacity 0.5s;
	user-select: none;
	-moz-user-select: none;
	-webkit-user-select: none;
	-ms-user-select: none;
	user-select: none;
}

@media (max-width: 420px) {
	.modal {
		left: 0;
		width: 100%;
		margin: auto;
		bottom: 0px;
		border-radius: 0px;
	}
}


.modal h1 {
	text-align: center;
	font-size: 20px;
	padding: 0;
	margin: 0;
}

.modal h2 {
	text-align: center;
	font-size: 16px;
	padding: 0;
	margin: 0;
}


.settings table {
	width: 100%;
}

.settings tr {
	font-size: 14px;
}

.settings td.link_btn {
	text-align: center;
	width: 30px;
}

.settings td.link_btn:hover {
	cursor: pointer;
}

.info table {
	width: 100%;
}

.info tr {
	font-size: 14px;
}

.info td.item_value {
	text-align: right;
}

table#lang_list span {
	cursor: pointer;
}

/*
.info td.link_btn {
	width:20px;
}

.info td.link_btn:hover {
	cursor:pointer;
}
*/
.modal div {
	margin-bottom: 10px;
	margin-top: 10px;
}

.modal input[type="number"] {
	font-size: 16px;
	display: block;
	margin: auto;
	width: 150px;
	padding: 5px;
	outline-style: none;
	border: 1px solid #ccc;
	border-radius: 3px;
}

.description {
	height: auto;
}

.description p {
	margin-bottom: 0;
	text-align: center;
}

.saveoverlay div {
	text-align: center;
	font-size: 12px;
}

.selection {
	margin-top: 17px;
	text-align: center;
}

.selection span {

	-webkit-transition: color 250ms, background 250ms;
	-moz-transition: color 250ms, background 250ms;
	-ms-transition: color 250ms, background 250ms;
	-o-transition: color 250ms, background 250ms;
	transition: color 250ms, background 250ms;

	cursor: pointer;
	font-size: 15px;
	margin: 5px;
	padding: 5px;
	border: 2px solid white;
	border-radius: 3px;
}

.selection span:hover {
	background: rgba(255, 255, 255, .8);
	color: black;
}

.savebutton {

	-webkit-transition: opacity 250ms;
	-moz-transition: opacity 250ms;
	-ms-transition: opacity 250ms;
	-o-transition: opacity 250ms;
	transition: opacity 250ms;

	font-size: 30px !important;
	margin: 15px auto;
	background: none;
	cursor: pointer;
	display: block;
	border: none;
	padding: 0;
	width: 80px;
	color: #fff;
	margin-top: -2px;
}

.yang .savebutton {
	color: #000;
}

.savebutton:hover {
	opacity: .7;
}

.activesave {
	background: rgba(255, 255, 255, .8);
	color: black;
}

.hiddentextbox {
	opacity: 0;
	filter: alpha(opacity=0);
	position: absolute;
}

/*********************************************
 * WORD COUNT
 *********************************************/


.counter-bar {
	box-shadow: inset 0 0 9px -2px rgba(0, 0, 0, .9);
	position: fixed;
	width: 100%;
	left: 0px;
	height: 6px;
	top: 0px;
	opacity: 0;
	transition: opacity 0.5s;
}

.counter-bar.active {
	opacity: 1;
}

.counter-bar .progress {
	opacity: 0.5;
	position: absolute;
	top: 0;
	height: 100%;
}

.word-progress {
	width: 0%;
	-webkit-transition: all 1s linear;
	-moz-transition: all 1s linear;
	-ms-transition: all 1s linear;
	-o-transition: all 1s linear;
	transition: all 1s linear;
	/*background-color: deepskyblue;*/
	background-color: rgb(60, 128, 170);
}

.time-progress {
	width: 0%;
	/*background-color: cornflowerblue;*/
	background-color: rgb(128, 128, 170);
}

.progress.complete {
	background-color: greenyellow;
	z-index: 9;
}

.font-progress {
	width: 32px;
	margin-left: -33px;
	transition: all 5s linear;
	background-color: orange;
	z-index: 10;
}

/*********************************************
 * UI BUBBLE
 *********************************************/

.text-options {

	-webkit-transition: opacity 250ms, margin 250ms;
	-moz-transition: opacity 250ms, margin 250ms;
	-ms-transition: opacity 250ms, margin 250ms;
	-o-transition: opacity 250ms, margin 250ms;
	transition: opacity 250ms, margin 250ms;

	position: absolute;
	left: -999px;
	top: -999px;
	color: #fff;
	height: 0;
	width: 0;
	z-index: 5;
	margin-top: 5px;
	opacity: 0;
}

.text-options.fade {
	opacity: 0;
	margin-top: -5px;
}

.text-options.active {
	opacity: 1;
	margin-top: 0;
}

.options {
	background-color: rgba(100, 100, 100, .9);
	position: absolute;
	border-radius: 5px;
	margin-left: -63px;
	margin-top: -46px;
	z-index: 1000;
	padding: 5px 4px 5px 5px;
	width: 125px;
	height: 40px;

	-webkit-transition: all 300ms ease-in-out;
	-moz-transition: all 300ms ease-in-out;
	-ms-transition: all 300ms ease-in-out;
	-o-transition: all 300ms ease-in-out;
	transition: all 300ms ease-in-out;
}

.options-mobile {
	position: fixed;
	right: 0px;
	top: 0px;
	margin: 0px;
	border-top-left-radius: 0px;
	border-top-right-radius: 0px;
	border-bottom-right-radius: 0px;
	border-bottom-left-radius: 5px;
}

.options.url-mode {
	width: 275px;
	margin-left: -137px;
}

.options.url-mode .bold,
.options.url-mode .italic,
.options.url-mode .quote {
	width: 0;
	overflow: hidden;
	margin-right: 0;
	opacity: 0;
}

.options .italic {
	font-style: italic;
}

.options button {
	transition: all 250ms ease-in-out;

	float: left;
	width: 28px;
	opacity: .7;
	height: 30px;
	border-radius: 3px;
	margin-right: 1px;
	font-family: 'Lora', serif;
}

.about {
	opacity: 0.4;
	transition: opacity 250ms ease-in-out;
}

.options.url-mode input {
	border-left: 2px solid transparent;
	padding-right: 5px;
	padding-left: 5px;
	width: 236px;
}

.options input {
	-webkit-transition: all 300ms ease-in-out;
	-moz-transition: all 300ms ease-in-out;
	-ms-transition: all 300ms ease-in-out;
	-o-transition: all 300ms ease-in-out;
	transition: all 300ms ease-in-out;

	border-radius: 3px;
	overflow: hidden;
	outline: 0;
	height: 30px;
	padding: 0;
	margin: 0;
	border: 0;
	float: left;
	width: 0;
}

.options button.active {
	background-color: rgba(255, 255, 255, .4);
	opacity: 1;
}

.yang .options button.active {
	background-color: rgba(0, 0, 0, .3);
}

.options button:hover,
.about:hover {
	opacity: .95;
}

.options:before {
	content: "";
	border-top: 5px solid rgba(100, 100, 100, .9);
	border-bottom: 5px solid transparent;
	border-right: 5px solid transparent;
	border-left: 5px solid transparent;
	position: absolute;
	margin-left: -5px;
	bottom: -15px;
	height: 5px;
	width: 0;
	left: 50%;
}

#spanfontfailed {font-size:smaller;display: none;color: darkorange;}
#spanfontloading {font-size:smaller;display: none;}

.options-mobile:before {
	border-top: 5px solid transparent;
}

.yang .options {
	background-color: rgba(240, 240, 240, .9);
	color: #000;
}

.yang .options:before {
	border-top: 5px solid rgba(240, 240, 240, .9);
}

.yang .options-mobile:before {
	border-top: 5px solid transparent;
}

.url {
	-webkit-font-smoothing: antialiased;
}

.top {
	position: absolute;
	top: 0;
}

.bottom {
	position: absolute;
	bottom: 0;
}



.wrapper {
	position: relative;
	height: 100%;
}

/*********************************************
 * FLOWSTATE
 *********************************************/
.finishsummary {
	margin-top: 17px;
	text-align: center;
}

/*********************************************
 * PRINT
 *********************************************/

@media print {

	body {
		overflow: visible;
	}

	section {
		color: #111 !important;
	}

	.text-options,
	.ui,
	.word-counter {
		display: none;
	}
}