﻿
:root {
  --background-color: #fafaf2;
  --text-color: #006284;
}


html {
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}



body {
margin-right:20px;margin-left:20px;margin-top:40px;margin-bottom:40px; line-height:100%;

	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
	-ms-touch-action: manipulation;
	touch-action: manipulation;
background-color: var(--background-color);
  color: var(--text-color);
	word-wrap: break-word;


}




body.night-mode {
  --background-color: #1A1A1A;
  --text-color: #FFFFFF;
}



body.bright-mode {
  --background-color: #FFFFFF;
  --text-color: #000000;
}




/*
 #fdfff2;
*#E4E6D1
EEF0E1

*/







a {
font-family: "Heiti SC", "STHeiti SC", Simsun, "MS Song", Mingliu, STSong, Hei, serif !important;
display: inline-block;
text-decoration: none;
border-bottom: none;
padding-bottom: 0.03em;
margin-bottom: 0.7em;
font-weight: bold;
color: #006284;

}




























::selection {
background:#006284;
color: #ffffff;
}

::-moz-selection {
background:#006284;
color: #ffffff;
}



.popover {
  position: absolute;
  z-index: 996;
  display: none;
  max-width: 276px;
  padding: 1px;
  text-align: left;
  
  
  font-family : "Times New Roman", Times, serif;
  font-size: 13px;
  font-weight: normal;
  line-height: 1.4;
  
  
  white-space: normal;
  background-color: #ffffff;
  border: 1px solid #cccccc;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
          box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
  background-clip: padding-box;
 
  
}

/*
#3e99ed
#ff749f
#006284
#383c70
*/





.popover-title {
  display: flex;
  justify-content: center;
  align-items: center;
  font-family : "SimHei";
  font-weight:bold;
   z-index: 996;
}


.popover-title ruby{color:black}
.popover-title ruby rt{font-family : "Times New Roman", Times, serif;color:#e26939;font-weight:bold}




.tooltip-inner {font-family: YUMINL; font-size: 12px; font-weight: 100; color: rgb(205,187,116); border-width: 1px;
}

.tooltip .tooltip-arrow {border-bottom: 5px solid #000000    color: #ffffff;  !important;}







html {
	-webkit-text-size-adjust: 100%;
}



.hidden {
	display: none !important;
}

#wrap {
	max-width: 800px;
	margin: 0 auto 0 auto;
	padding: 25px 0;
/*	height: 100%; position: relative;*/
}

#article {
width: 800px;
margin: 0 auto;
font-family:SimSun; font-size:24px;
	counter-reset: section;	
	line-height: 150%;

}










#article p, #article h1, #article h2, #article h3, #article h4, #article h5, #article h6 {
	color: #444;
	
/*	ここで選択できなくする  */
/*
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	
*/

	
	box-sizing: border-box;
	padding: 15px 15px;
	padding: 10px;
	cursor: default;
	position: relative;
}

#article p, #article h1 {
	font-size: 100%;
}	

#article h2, #article h3, #article h4 { font-size: 140%;}


#article h1 {
	font-weight: bold;
	font-family: "times", sans-serif;
	color: #006284;
}

#article img {
	padding: 10px 0;
	height: auto;
	max-width: 100%;
	display: block;
	margin-left: auto;
	margin-right: auto;
}

#article p:before, #article h1:before, #article h2:before, #article h3:before, #article h4:before, #article h5:before, #article h6:before {
	position: absolute;
	left: 5px;
	top: 0px;
	color: #bbb;
	font-family: "times", sans-serif;
	font-size: 10px;
	font-weight: bold;
	line-height: 20%;
	display: inline-block;
	vertical-align: middle;
}

.japanese {
	position: relative;
	left: 5px;
	font-size: 10px;
	display: inline-block;
	vertical-align: middle;
		line-height: 10%;

}








.box {
	background-color: #f6f6ea;
	padding: 1em;
	margin : 1em;
	  font-size: 13px;
  font-weight: normal;
  line-height: 1.4;
}



#volume {
	font-size: 90%;
	color: #ccc;		
	cursor: pointer;
	text-decoration: none;
}






#article p:before {
	counter-increment: section;
	content: counter(section);
}

#article h1:before, #article h2:before, #article h3:before, #article h4:before, #article h5:before, #article h6:before {
	content: "";
}

.section.title {
	font-family: "times", sans-serif;
	font-weight: bold;
}

em, b, strong {
	font-family: "times", sans-serif;
	font-weight: bold;
	font-style: normal;
}

.section + .section {


}



.zh-words {
    display:inline-block;
    cursor: pointer;
    z-index: auto;
    font-weight: bold;
    text-decoration: none; /* Remove the default underline */
}

.zh-words:hover {
    background-color: #ddd;
    color: #2a6496;
    text-decoration: underline; /* Add underline on hover */
    text-decoration-thickness: 1px; /* Set underline thickness */
    text-underline-offset: 3px; /* Set underline offset */
}



.jinmei_timei {
  border-bottom: #006284 1px solid;
}


.jinmei_timei:hover {
  border-bottom: none;
}


.jidai {
  border-bottom: #006284 10px wavy;
}


.jidai:hover {
  border-bottom: none;
}


.shomei {
  border-bottom: #006284 3px double;
}


.shomei:hover {
  border-bottom: none;
}





.marked, .show-pinyin, .show-definition {
	font-family: "times", sans-serif;
	font-weight: bold;
	position: relative;

}






#article .zh-words:nth-child(2n+1).marked, #article .zh-words:nth-child(2n+1).show-pinyin,  #article .zh-words:nth-child(2n+1).show-definition {
	color: #e26939;
	/* background: #ddd; */

}











#article .zh-words:nth-child(2n).marked, #article .zh-words:nth-child(2n).show-pinyin, #article .zh-words:nth-child(2n).show-definition  {
	color: #e26939;
	background: #ccc;

}

#article.colorful .zh-words:nth-child(2n+1).marked, #article.colorful .zh-words:nth-child(2n+1).show-pinyin,  #article.colorful .zh-words:nth-child(2n+1).show-definition {
	color: #e26939;
	background: none;

}

#article.colorful .zh-words:nth-child(2n).marked, #article.colorful .zh-words:nth-child(2n).show-pinyin, #article.colorful .zh-words:nth-child(2n).show-definition  {
	color: #e26939;
	background: none;	

}

#article.colorful .zh-words:nth-child(3n).marked, #article.colorful .zh-words:nth-child(3n).show-pinyin, #article.colorful .zh-words:nth-child(3n).show-definition {
	color: #e26939;
	background: none;	

}




/*

.colorful .marked.orange, .colorful .show-pinyin.orange, .colorful .show-definition.orange {
	color: #ff7f2a;
}

.colorful .marked.blue,  .colorful .show-pinyin.blue, .colorful .show-definition.blue {
	color: #00ccff;
}

.colorful .marked.yellow,  .colorful .show-pinyin.yellow, .colorful .show-definition.yellow {
	color: #ffb400;
}

.colorful .marked.pink, .colorful .show-pinyin.pink, .colorful .show-definition.pink {
	color: #e26939;
}
*/






.show-pinyin:before, .show-definition:before {
	content: attr(data-rt);
	position: absolute;
	font-size: 14px;
	font-family: "times", sans-serif;
	bottom: -0.9em;
	text-align:center;
	width:100%;
	white-space: nowrap;
	color: #666;
	font-weight: normal;

}





.inactive {
	color: #ccc;
}


.inactive:hover {
	color: #666;
	cursor: pointer;
	background: #eee;
	
	

}




/*

#definition-box {
position: fixed;
width: 100%;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.7);
font-size:100%;
z-index: 100;
padding: 3px;
cursor: pointer;
min-height: 30px;
height: auto;
}

#definition-box.expanded {
	height: 30px;
}

#definition-box-word {
	font-size: 250%;
	color:white;
	padding: 15px 50px;
	box-sizing: border-box;
	position: relative;
	display: inline-block;
	text-align: center;
	display:none;
}

#definition-box #definition-box-toggle {
	display: none;
}


#definition-box #definition-box-toggle {
	color: #222;
	position: fixed;
	bottom: 0;
	right: 0;
	padding: 0 8px;
	font-size: 160%;
	cursor: pointer;
	display:inline-block;
	vertical-align: middle;				
}

#definition-box #definition-box-toggle:before {
	content: "\f055";
	font-family: FontAwesome;
}

#definition-box.expanded #definition-box-toggle:before {
	content: "\f056";
	font-family: FontAwesome;		
}

#definition-box #definition-box-toggle:hover {
	color: #f2f2f2;
}




#definition-box-word:before {
	content: attr(data-pinyin);
	position: absolute;
	font-size: 15px;
	font-family: sans-serif;
	bottom: 5px;
	text-align:center;
	width:100%;

#definition-box-text {
	color: white;
	display: inline-block;
	font-size: 100%;
	width:100%;
	text-align:center;

}

*/




#navigation {
	position: fixed;
	height: 25px;
	color: #666;
	text-align: center;
	width: 100%;
	left: 0;
	right: 0;
	top: 0;
	/* padding: 10px 0; */
	z-index: 1000; 
}



#navigation-back, #navigation-info, #navigation-settings {
	position: absolute;
	font-size: 150%;
	padding: 5px 10px;
}
#navigation-back, #navigation-info, #navigation-settings, #side-tools a{
	color: #ccc;
	cursor: pointer;
	text-decoration: none;
}


	
#article.colorful #side-tools a#tool-colors {
	color: #e26939;
	color: #28359E;
	color: #ffb400;
}

#navigation-back:hover, #navigation-info:hover, #navigation-settings:hover, #side-tools a:hover, #article.colorful #side-tools a#tool-colors:hover {
	color: #666;
	text-decoration: none;
}

#navigation-back { left: 0; }




#navigation-back2 {
    position: fixed; /* Change to fixed position */
    bottom: 0;   
    left: 0;         /* Align to the left */
    font-size: 150%;
    padding: 5px 10px 0 10px; 
    color: #ccc;
    cursor: pointer;
    text-decoration: none;
    z-index: 1000;   /* Ensure it's above other elements */
}

#navigation-back2:hover {
    color: #666;
    text-decoration: none;
}




#tool-export {
    position: fixed;
    bottom: 0;    /* Make sure this matches the bottom value of navigation-back2 */
    right: 0;        /* Or adjust to the desired position */
padding: 5px 10px;

}





#navigation-info, #navigation-settings { right: 0;}
#navigation-info { display: none;}

#navigation-progress {
	font-size: 90%;
}


#side-tools {
	position: fixed;
	right: 0;
	bottom: 15%;
	z-index: 998;
}

#side-tools a {
	padding: 0 10px;
	display: block;
	text-align: center;
	font-size: 150%;
	z-index: 998;
}

#tool-definition-location, #tool-definition-location:before {
	display: none;
	z-index: 998;
}

#tool-definition-location:before{
	content: "\f01b";
	font-family: FontAwesome;
	z-index: 998;
}

#tool-definition-location.top:before{
	content: "\f01a";
	font-family: FontAwesome;
	z-index: 998;
}

#definition-box.top {
	top: 0;
	bottom: inherit;
}

#navigation.top {
	bottom:15px;
	top: inherit;
}

.article-list-item-poster {
	background: #ddd;
	position: relative;
	width:100%;
	height:150px;
}



#rocket {
	text-align:center;
	color: #ccc;
	font-size: 150%;	
	text-decoration: none;
	display: block;
}

#rocket-launch {
	position: absolute;		
}

#info{
	font-size:90%;
	color:#999;
	text-align:center;
	margin: 10px 5px;
}

#info a {
	color: inherit;
	text-decoration: underline;
}
.page-numbers {
text-align: center;
margin-top: 60px;
}

.page-number {
	display: inline-block;
	padding: 10px 15px;
	color: #bbb;
	border: 1px solid #bbb;
	border-radius: 20px;
	text-decoration: none;
}

.page-number.left {
border-radius: 20px 0 0 20px;
padding: 10px 15px 10px 20px;
}

.page-number.right {
border-radius: 0 20px 20px 0;	
padding: 10px 20px 10px 15px;
}

.page-number.left + .page-number.right {
	border-left: none;
}
.page-number:hover {
	background: #bbb;
	color: #f2f2f2;
}




#exported-words-box {
	position: fixed;
	width: 100%;
	height: 100%;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	background: rgba(0, 0, 0, 0.9);
	overflow: hidden;
	z-index: 1000;
	cursor: pointer;
}

#exported-words-box:after {
	content: "戻るには暗い部分をクリックしてください";
	font-family: sans-serif;
	font-size: 90%;
	color: #f2f2f2;
	width: 100%;
	position: absolute;
	text-align: center;
	bottom: 10%;
}


#exported-words-box-inner {
	display: block;
	width: 90%;
	height: 50%;
	max-width: 860px;
	margin: 5px auto;
	padding: 10px;
	background: #f2f2f2;
	font-family : "Times New Roman", Times, serif;
	font-size: 90%;
	line-height: 1.2;  /* Adds comfortable spacing between lines */
	color: #444;
	overflow: auto;
	z-index: 2000;
	white-space: pre;
	word-wrap: normal;
}




#categories {
	font-size:90%;
	text-align:center;
	margin:10px;
	padding:5px;
}
#categories, #categories a {
	color:#666;
	text-decoration: none;
}

#categories a:hover {
	text-decoration: underline;
}
#categories a.current {
	font-weight: bold;
	text-decoration: none;
	cursor: default;
}






    .btn-active {
        background-color: #666; /* Darker background for active state */
        color: white;
    }











#fixed-buttons {
    position: sticky;
    top: 0;
    background-color: #fafaf2;
    padding: 10px 0;  /* Remove horizontal padding, keep vertical */
    z-index: 997;
    width: 800px;  /* Match other elements' width */
    margin: 0 auto;  /* Center the element */
    text-align: left;  /* Align content to the left */
}








.overlay {
    display: none; /* Initially hidden, shown when needed */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    /* Flexbox for centering the spinner */
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner {
    top: 50%;
    margin-left: -20px;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}


@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}









.container {
  display: flex;
  flex-direction: column;
  width: 800px;
  font-size: 21px;
  margin: 0 auto;
  padding: 0;  /* ensure no padding */
  box-sizing: border-box;  /* include padding in width calculation */

}

/* If container has parent elements, make sure they don't add extra width */
.container > * {
  width: 100%;
  max-width: 800px;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}








#textInput {
    resize: vertical;
    overflow: auto;
    margin-bottom: 10px;
    /* Remove width: 100%; to allow natural stretching */
    font-size: 21px;
}






@media screen and (max-width: 600px) {
    body {
        margin: 0;
        padding: 20px;
        box-sizing: border-box;
    }

    /* Main containers */
    #wrap, #article, .container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box;
    }

    /* Article text size */
    #article {
        font-size: 24px !important;
    }

    /* Common width for main elements */
    .resizeimage,
    #textInput,
    #transmit-button {
        width: calc(100% - 40px) !important;
        margin-left: 20px !important;
        margin-right: 20px !important;
        margin-top: 10px;
        margin-bottom: 10px;
        box-sizing: border-box;
    }












    #fixed-buttons {
        width: 100% !important;
        margin: 10px 0 !important;
        padding: 10px 20px !important;
        box-sizing: border-box;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 5px !important;
        background-color: #fafaf2;
        justify-content: flex-start;
    }

    /* Consistent styling for all buttons */
    #fixed-buttons button,
    #fixed-buttons a {
        font-family: "Hiragino Sans", sans-serif !important;
        flex: 1 1 auto !important;
        min-width: calc(33.33% - 5px) !important;
        margin: 0 !important;
        font-size: 14px !important;
        padding: 8px 4px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        height: 35px !important;
        line-height: 1.2 !important;
        box-sizing: border-box !important;
    }

    /* Last two buttons styling */
    #togglePopupScript,
    #fixed-buttons a:last-child {
        min-width: calc(50% - 5px) !important;
        flex: 0 1 calc(50% - 5px) !important;
        width: calc(50% - 5px) !important;
    }

    /* Create a wrapper for last two buttons */
    #togglePopupScript,
    #fixed-buttons a:last-child {
        margin-right: auto !important;
        margin-left: auto !important;
    }

    /* Specific styling for the anchor and its button */
    #fixed-buttons a {
        display: inline-flex !important;
        text-decoration: none !important;
        padding: 0 !important;
    }

    #fixed-buttons a button#export_pdf {
    　font-family: inherit !important;
        width: 100% !important;
        height: 35px !important;
        margin: 0 !important;
        padding: 8px 4px !important;
        min-height: 35px !important;
        line-height: 1.2 !important;
    }




    /* Keep corner icons as they were */
    #navigation-back, 
    #navigation-back2, 
    #navigation-info, 
    #navigation-settings,
    #tool-export {
        font-size: 150% !important;
        padding: 5px 10px;
    }
}



#transmit-button {
    background-color: #007bff;
    color: white;
    border: 1px solid #007bff;
    border-radius: 5px;
    margin-right: 10px;
    padding: 8px 16px;
    line-height: 1.2;
    /* Set a specific width for the button */
    width: 100%; /* You can adjust this value as needed */
    box-sizing: border-box;
    font-size: 21px;
}




#transmit-button:hover:hover {
    background-color: #0056b3;
}




#transmit-button:disabled {
    background-color: gray;
    cursor: not-allowed;
    border: gray;

}


#transmit-button:disabled:hover {
    background-color: darkgray;
    border: darkgray;

    
}









.content-container {
    display: flex;
    align-items: flex-start;

}






.spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.spinner-text {
    margin-bottom: 10px; /* Adjust as needed */
    color: #fff; /* Or any color you want for the text */
}



.resizeimage {
  max-width: 800px;
  height: auto;
}









.results-container {
    margin: 20px auto;
    padding: 15px;
    border: 1px solid #006284;  /* Set border to blue */
    border-radius: 5px;
    background-color: var(--background-color);
    max-width: 100%;
    box-sizing: border-box;
    width: 800;
}

.results-container p {
    margin: 5px 0;
    font-size: 16px;
    color: #006284;  /* Set text to blue */
}

/* Ensure night mode uses the same colors */
body.night-mode .results-container {
    border-color: #006284;  /* Keep blue border in night mode */
}

body.night-mode .results-container p {
    color: #006284;  /* Keep blue text in night mode */
}

