* { box-sizing: border-box; }

body
{
	padding: 0px;
	margin: 0px;
}

body:has(dialog[open])
{
	overflow: hidden;
}

header
{
	position: sticky;
	z-index: 2;
	top: 0px;
	left: 0px;
	width: 100%;
	height: 50px;
	margin: 0px;
	margin-bottom: 1rem;
	background-image: none;
	opacity: 1.0 !important;
	box-shadow: 0px 5px 15px 5px hsl( 0, 0%, 0%, 0.5 );
	display: flex;
	justify-content: space-between;
	flex-flow: row nowrap;
}


.newtext
{
	font-size: 1.5rem;
	width: min( 40%, 640px );
	margin-left: 7%;
	margin-right: auto;
	display: inline-block;
	vertical-align: top;
	border: 2px solid;
	opacity: 0.9;
}

.topictext
{
	font-size: 1.5rem;
	width: min( 40%, 640px );
	margin-left: 7%;
	margin-right: auto;
	display: inline-block;
	vertical-align: top;
	border: none;
	opacity: 1.0;
}

.interactable
{
	cursor: pointer;
}

.header_button
{
	flex: 0 0 32px;
	height: 32px;
	margin: 0px;
	padding: 0px;
	mask-size: cover;
	mask-repeat: no-repeat;
	font-size: 0px !important;
}

.toc_button
{
	width: 100%;
	margin: 0px;
	padding: 4px 10px;
	font-size: 1.5rem !important;
	font-weight: bold;
}

.btn_menu_open
{
	mask-image: url('icons/icon_hamburger.png');
}

.btn_help
{
	mask-image: url('icons/icon_help.png' );
}

.btn_chapter_next
{
	mask-image: url('icons/icon_chapter_next.png');
}

.btn_chapter_prev
{
	mask-image: url('icons/icon_chapter_prev.png');
}

.btn_toc
{
	mask-image: url('icons/icon_toc.png');
}

.btn_close
{
	mask-image: url('icons/icon_close.png');
}

.btn_donate
{
	mask-image: url('icons/icon_donate.png');
}

.btn_feedback
{
	mask-image: url('icons/icon_feedback.png');
}

.btn_settings
{
	mask-image: url('icons/icon_settings.png');
}

.btn_font_size
{
	mask-image: url('icons/icon_font_size.png');
}

.btn_font_size_up
{
	mask-image: url('icons/icon_font_size_up.png');
}

.btn_font_size_down
{
	mask-image: url('icons/icon_font_size_down.png');
}

.btn_edit
{
	mask-image: url('icons/icon_edit.png');
}

.close_button
{
	position: absolute;
	top: 8px;
	right: 8px;
	height: 24px;
	width: 24px;
}

.storynav
{
	flex: 0 0 225px;
	display: flex;
	justify-content: space-between;
}

/*.storynav button:disabled, #helpscreen button:disabled*/
button:disabled
{
	filter: invert(100%) saturate(0%) contrast(25%) brightness(150%) blur(1px);
}

.st_new
{
	width: min( 1200px, 100% );
	margin: auto;
	padding: 10px;
	height: max-content;
	border-top: 5px solid;
}

#form_nav
{
	visibility: hidden;
	position: absolute;
	top: 0px;
	left: -100px;
	height: 0px;
	width: 0px;
}

#storywin
{
	font-size: 16px;
}

dialog
{
	box-shadow: 0px 0px 40px 15px hsl( 0, 0%, 0%, 0.7);
}

#navmenu, #admin
{
	width: min( 33%, 640px );
	height: 100vh;
	position: fixed;
	top: 0px;
	left: 0px;
	opacity: 1.0;
	margin: 0px;
	padding: 0px;
}

dialog .cellpostheader
{
	text-align: center;
	font-size: 0.75rem;
	padding-right: 25px;
}

dialog .cellpostheader .title
{
	font-size: 1.5rem;
	font-weight: bold;
}

dialog .cellpostheader .utitle
{
	font-size: 1.25rem;
	font-weight: bold;
}

dialog.toc
{
	width: min( 45%, 640px );
	height: 100vh;
	position: fixed;
	top: 0px;
	left: 50%;
	transform: translate(-50%);
	opacity: 1.0;
	margin: 0px;
	padding: 0px;
}

dialog.commondlg
{
	width: min( 90%, 960px );
	height: 100vh;
	overflow: auto;
	position: fixed;
	top: 0px;
	left: 50%;
	transform: translate(-50%);
	opacity: 1.0;
	margin: 0px;
	padding: 0px;
}

dialog.commondlg .cellpostheader
{
	margin: 0px;
	padding: 5px;
}

dialog::backdrop
{
	background-color: hsl( 0, 0%, 0%, 0.4 );
}

.dlgbody
{
	width: 100%;
	height: 90%;
	overflow: auto;
	font-size: 1.5rem !important;
	line-height: 2rem !important;
}

.dlgbody .input_submit
{
	width: 100% !important;
	font-size: 1.5rem !important;
}

.dlgbody .input_text, .dlgbody .input_text_long
{
	font-size: 1.5rem !important;
}

dialog section
{
	padding-top: 1rem;
}

.dlgbody section div
{
	font-size: 1.5rem;
}

#navmenu section a, #admin section a
{
	display: inline-block;
	font-size: 1.5rem !important;
	width: 100%;
	text-align: center;
	border-top-style: solid;
	border-bottom-style: solid;
	border-width: 2px 0px 2px;
	padding: 5px;
	text-decoration: none !important;
}

#navmenu section a:first-of-type, #admin section a:first-of-type
{
	border-top-width: 2.5px !important;
}

#navmenu section a:last-of-type, #admin section a:last-of-type
{
	border-bottom-width: 2.5px !important;
}

#helpscreen
{
	font-size: 1.5rem;
}

#helpscreen section
{
	padding: 10px;
	padding-left: 42px;
}

#helpscreen li
{
	list-style-type: none;
	margin-bottom: 1rem;
	text-indent: -42px;
}

#helpscreen ul button
{
	width: 32px;
	margin-right: 10px;
}

#donation section div.center;
{
	font-size: 1.5rem !important;
}

#donation .donation_explanation
{
	padding: 10px;
	padding-bottom: 25vh;
	line-height: initial !important;
}

#donation .donation_explanation h2
{
	font-size: 2.25rem;
	line-height: initial;
}


.donation_methods_container
{
	display: flex;
	flex-flow: row nowrap;
	width: 90%;
	margin: auto;
}

.paypal_donation_method
{
	flex: 1 0 40%;
}

.other_donation_methods
{
	flex: 1 0 45%;
}

.other_donation_methods li
{
	margin-bottom: 2rem;
}

#feedback form, #storywin form
{
	margin-left: auto;
	margin-right: auto;
}

#feedback .input_textarea_large
{
	height: 50vh;
}

#fontsize
{
	position: fixed;
	top: 50px;
	right: 0px;
	width: 40%;
	left: auto !important;
	transform: none !important;
	max-height: 50vh;
	border-style: solid;
	border-width: 2px;
	margin: 0px !important;
	opacity: 1.0;
}

#fontsize_save_status
{
	display: block !important;
	font-size: 1.5rem !important;
	height: max-content !important;
	text-align: center;
}

#fontsize div
{
	display: flex;
	flex-flow: row nowrap;
	justify-content: center;
	align-items: flex-end;
	gap: 30px;
	width: 100%;
	height: 40px;
	padding-right: 30px;
	font-size: 2rem;
	font-weight: bold;
}

#fontsize::backdrop
{
	opacity: 0.25;
}

#fontsize .header_button
{
	flex: 0 0 32px;
	border: none;
}

.indextext
{
	font-size: 1rem;
	width: min( 40%, 760px );
	margin-left: 7%;
	margin-right: auto;
	display: inline-block;
	vertical-align: top;
	border: 2px solid;
	opacity: 0.9;
}

@media (min-resolution: 2dppx )
{
	header
	{
		height: 90px;
		padding-top: 10px !important;
	}
	
	.header_button
	{
		flex: 0 0 64px;
		height: 64px;
	}
	
	.newtext,.topictext
	{
		width: min( 90%, 900px); 
		margin-left: 5%; 
		margin-right: auto;
		font-size: 3rem !important;
	}
	
	.close_button
	{
		height: 64px;
		width: 64px;
	}
	
	#navmenu, #admin
	{
		width: min( 90%, 960px );
	}
	
	dialog .cellpostheader
	{
		font-size: 2rem;
	}
	
	dialog .cellpostheader .title
	{
		font-size: 3rem;
	}
	
	dialog .cellpostheader .utitle
	{
		font-size: 2.5rem;
	}

	.dlgbody
	{
		width: 100%;
		height: 90%;
		overflow: auto;
		font-size: 4rem !important;
		line-height: 8rem !important;
		padding: 10px;
	}
	
	#navmenu section a, #admin section a
	{
		display: inline-block;
		font-size: 4rem !important;
	}

	.dlgbody .input_text
	{
		font-size: 4rem !important;
	}

	.dlgbody .input_text_long
	{
		font-size: 4rem !important;
	}

	.dlgbody .input_submit
	{
		font-size: 4rem !important;
	}

	dialog.toc
	{
		width: min( 90%, 960px );
	}

	.toc_button
	{
		width: 100%;
		margin: 0px;
		margin-bottom: 0.5rem;
		padding: 40px 10px;
		font-size: 4rem !important;
		font-weight: bold;
	}

	.storynav
	{
		flex: 0 0 300px;
	}
	
	dialog h1
	{
		font-size: 4rem;
	}
	
	#helpscreen
	{
		font-size: 1.5rem;
	}

	#helpscreen section
	{
		padding: 10px;
		padding-left: 75px;
		font-size: 1.5rem !important;
		line-height: initial !important;
		padding-bottom: 25vh;
	}
	
	#helpscreen li
	{
		list-style-type: none;
		margin-bottom: 5rem;
		text-indent: -74px;
	}

	#helpscreen ul button
	{
		width: 64px;
		margin-right: 10px;
	}

	#donation
	{
		font-size: 1.5rem;
	}

	#donation section
	{
		padding: 10px;
	}

	#donation section p
	{
		font-size: 1.5rem !important;
	}

	#donation .dlgbody div.center
	{
		font-size: 1.5rem !important;
		line-height: initial !important;
	}

	.donation_methods_container
	{
		display: flex;
		flex-flow: row wrap;
		width: 90%;
		margin: auto;
	}

	.paypal_donation_method
	{
		flex: 1 0 90%;
	}

	.other_donation_methods
	{
		flex: 1 0 90%;
		font-size: 2rem;
		line-height: initial;
	}

	#fontsize
	{
		position: fixed;
		top: 50px;
		right: 0px;
		width: 80%;
		left: auto !important;
		transform: none !important;
		height: max-content;
		border-style: solid;
		border-width: 2px;
		margin: 0px !important;
		opacity: 1.0;
	}
	
	#fontsize div
	{
		margin: 0px;
		padding: 5px;
		height: 80px;
		padding-right: 70px;
		font-size: 4rem;
		line-height: initial;
		font-weight: bold;
	}
	
	#fontsize .header_button
	{
		flex: 0 0 64px;
		border: none;
	}

	.indextext
	{
		font-size: 3rem;
		width: min( 90%, 900px );
		margin-left: 7%;
		margin-right: auto;
		display: inline-block;
		vertical-align: top;
		border: 2px solid;
		opacity: 0.9;
	}
}

