/* === Reset (replaces Bootstrap 2 normalize) === */
/**, *::before, *::after {
	box-sizing: border-box;
}*/

html {
	font-size: 100%;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	line-height: 1.2;
	color: #333;
}

a {
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

img {
	max-width: 100%;
	height: auto;
	vertical-align: middle;
	border: 0;
}

button, input, select, textarea {
	margin: 0;
	font-family: inherit;
	font-size: 100%;
	vertical-align: middle;
}

/* === Layout grid (replaces Bootstrap 2 grid) === */
.container {
	max-width: 1170px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 20px;
	padding-right: 20px;
}

.row {
	display: flex;
	flex-wrap: wrap;
}

.row::after {
	content: "";
	display: table;
	clear: both;
}

.span1  { flex: 0 0 8.333%;  max-width: 8.333%;  }
.span2  { flex: 0 0 16.667%; max-width: 16.667%; }
.span3  { flex: 0 0 25%;     max-width: 25%;     }
.span4  { flex: 0 0 33.333%; max-width: 33.333%; }
.span5  { flex: 0 0 41.667%; max-width: 41.667%; }
.span6  { flex: 0 0 50%;     max-width: 50%;     }
.span7  { flex: 0 0 58.333%; max-width: 58.333%; }
.span8  { flex: 0 0 66.667%; max-width: 66.667%; }
.span9  { flex: 0 0 75%;     max-width: 75%;     }
.span10 { flex: 0 0 83.333%; max-width: 83.333%; }
.span11 { flex: 0 0 91.667%; max-width: 91.667%; }
.span12 { flex: 0 0 100%;    max-width: 100%;    }

.offset1 { margin-left: 8.333%;  }
.offset2 { margin-left: 16.667%; }
.offset3 { margin-left: 25%;     }

/* Nested span10 = full width of parent (Bootstrap 2 used fixed pixels so nesting didn't shrink) */
[class*="span"] .span10 {
	flex: 0 0 100%;
	max-width: 100%;
}

@media (max-width: 767px) {
	.row {
		flex-direction: column;
	}
	[class*="span"] {
		flex: 0 0 100%;
		max-width: 100%;
	}
	[class*="offset"] {
		margin-left: 0;
	}
}

/* === Button base (replaces Bootstrap .btn) === */
.btn {
	display: inline-block;
	padding: 4px 12px;
	margin-bottom: 0;
	font-size: 14px;
	line-height: 20px;
	text-align: center;
	vertical-align: middle;
	cursor: pointer;
	background-color: #f5f5f5;
	border: 1px solid #ccc;
	border-radius: 4px;
	color: #333;
	text-decoration: none;
}

.btn:hover {
	background-color: #e6e6e6;
	text-decoration: none;
}

/* === Alert (replaces Bootstrap .alert) === */
.alert {
	padding: 8px 14px;
	margin-bottom: 10px;
	background-color: #fcf8e3;
	border: 1px solid #fbeed5;
	border-radius: 4px;
	color: #c09853;
}

.alert-error {
	background-color: #f2dede;
	border-color: #eed3d7;
	color: #b94a48;
}

/* === Table (replaces Bootstrap .table) === */
.table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 20px;
}

.table th,
.table td {
	padding: 8px;
	text-align: left;
	border-top: 1px solid #ddd;
}

.table thead th {
	vertical-align: bottom;
	border-bottom: 2px solid #ddd;
}

.table tbody tr:hover td {
	background-color: #f5f5f5;
}

/* === Site styles === */

body{
	background-color: #fefefe;
	font-size: 14px;
}

#display{
	padding: 10px;
	border: 1px solid #ccc;
	background-color: white;
	font-size: 18pt;
	margin-bottom: 10px;
	position: relative;
}

.border{
	-moz-border-radius: 5px;
	border-radius: 5px;
	-webkit-border-radius: 5px;
	-khtml-border-radius: 5px;
	box-shadow: 0.07em 0.07em 0.07em #eee;
}
.login{
	border: 1px solid #ccc;
	padding: 10px;
}
.removefav{
	height: 25px;
	margin-right: 5px;
	line-height: 15px;
	background-color: #fefefe;
	border-style: none;
	color: #aaa;
}

.decomptitle{
	width: 100px;
	display: inline-block;
	padding: 5px;
	border: 1px solid #ccc;
	margin-right: 3px;
	margin-bottom: 3px;
	margin-top: 3px;
}

.decompbox{
	display: inline-block;
	border: 1px solid #ccc;
	padding: 5px;
	width: 75%;
}
#addfav{
	font-size: 0.66em;
}

.meaning{
	margin-top: 5px;
	font-size: 1em;
}

.appearsin{
	word-wrap:break-word;
}

.appearsinbox{
	padding: 8px;
	border: 1px solid #ccc;
}

.newsbite{
	border: 1px solid #e0c6ca;
	font-size: 0.9em;
	padding: 2px 14px;
	background-color: #fdf5f6;
	border-radius: 20px;
	white-space: nowrap;
}

.manychar{
	height: 100%;
}
.decomp{
	font-size: 0.7em;
	width: 100%;
}
#decompose{
	height: 45px;
}
#header{
	position: sticky;
	top: 0;
	z-index: 1000;
	background-color: #fefefe;
	border-bottom: 1px solid #ddd;
	box-shadow: 0 2px 4px rgba(0,0,0,0.06);
	margin-bottom: 20px;
	width: 100%;
}

.header-inner{
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 20px;
	flex-wrap: wrap;
	gap: 4px 0;
}

.headerleft{
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.header-links{
	display: flex;
	align-items: center;
	gap: 8px;
}

.header-links-mobile{
	display: none;
}

/* Hamburger button — hidden on desktop */
#nav-hamburger{
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 6px;
	flex-direction: column;
	gap: 4px;
	flex-shrink: 0;
}
.hamburger-bar{
	display: block;
	width: 22px;
	height: 3px;
	background: #333;
	border-radius: 2px;
}

/* Drawer overlay */
#nav-drawer-overlay{
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.4);
	z-index: 2000;
}
#nav-drawer-overlay.open{
	display: block;
}

/* Drawer panel */
#nav-drawer{
	position: fixed;
	top: 0;
	left: -300px;
	width: 260px;
	height: 100%;
	background: #fff;
	z-index: 2001;
	box-shadow: 2px 0 8px rgba(0,0,0,0.15);
	transition: left 0.25s ease;
	padding: 16px 20px;
	overflow-y: auto;
}
#nav-drawer.open{
	left: 0;
}
#nav-drawer-close{
	background: none;
	border: none;
	font-size: 28px;
	cursor: pointer;
	color: #333;
	padding: 0 4px;
	margin-bottom: 16px;
}
.drawer-links{
	display: flex;
	flex-direction: column;
	gap: 0;
}
.drawer-links a{
	padding: 12px 0;
	font-size: 1em;
	color: #333;
	text-decoration: none;
	border-bottom: 1px solid #eee;
}
.drawer-links a:hover{
	color: #b83746;
}

.header-dot{
	color: #aaa;
}

.header-link{
	font-size: 0.9em;
	white-space: nowrap;
}

.headerclear{
	display: none;
}

#header > .clear{
	display: none;
}


#about p{
	margin-left: 15px;
	font-size: 1.1em;
}

#buytext p{
	font-size: 1.1em;
}
.links{
	font-size: 1em;
	text-align: right;
	white-space: nowrap;
	margin-left: auto;
	flex-shrink: 0;
}

.title{
	flex-shrink: 0;
}

.title h1 {
	padding: 0;
	margin: 0;
	font-size: 2.5em;
}

.entry{
	border-bottom: 1px dotted #888;
	margin-bottom: 8px;
	padding-bottom: 8px;
}

ol li{
	font-size: 1em;
	padding: 3px;
}

ul li{
	font-size: 1em;
	padding: 3px;
	list-style-type:square
}

li.list{
	display: inline-block;
}

h1{
	color: #b83746;
	font-size: 3em;
	margin-top: 5px;
}
h1 a:hover{
	text-decoration: none;
}
h2{
	margin: 0px;
}
h3{
	color: #b83746;
	margin: 0px;
	line-height: 1em;
	font-size: 1.2em;
	margin-bottom: 5px;
}
p{
	font-size: 1.2em;
}
#buy p{
	font-size: 0.8em;
}

.list_head{
	height: 75px;
	width: 70px;
	border: 1px solid #aaa;
	font-size: 1.1em;
	background-color: white;
	padding: 8px;
	line-height: 2.5em;
	text-align: center;
	float: left;
}

.list_details{
	line-height: 1.3em;
	font-size: 1.1em;
	height: 75px;
	width: 120px;
	border: 1px solid #aaa;
	padding: 8px;
	float: left;
	margin-right: 2px;
}
.printable-cta {
	text-align: center;
	cursor: pointer;
}
.printable-cta img{
	width: 50%;
	border-radius: 5px;
}

.bigchar{
	border-radius: 3px;
	width: 130px;
	border: 1px solid #aaa;
	font-size: 3em;
	background-color: white;
	padding: 9px;
	text-align: center;
	margin-bottom: 5px;
	line-height: 1em;
	display: inline-block;
}

.mobile-banner {
	width: 280px; 
	/*width:;*/
	right: 0px;
	top: -12px;
	position: absolute;
}

.character-nav {
	font-size: 0.8em;
}

.next-char {
	margin-left: 22px;
}

a{
	color: #b83746;
}
.dashboard{
	height: 100%;
	
}
#favorites{
	width: 105%;
}
#history{
	width: 105%;
}
.smallest-font {
	font-size: 0.6em;
}
.smaller-font {
	font-size: 0.8em;
}
.favblock,
.wordblock{
	padding: 3px;
	width: 151px;
	float: left;
	margin: 2px;
	border: 1px solid #ccc;
}
.wordblock {
	position: relative;
}

.favblockdash{
	padding: 3px;
	width: 145px;
	float: left;
	margin: 2px;
	border: 1px solid #ccc;
}

.hidden {
	display: none;
}

#input{
	/*font-family: chinchar;*/
	height: 40px;
	font-size: 16pt;
	border: 1px solid #ccc;
	display: inline-block;
	border-radius: 5px;
	padding: 2px 10px;
	width: 270px;
}

#info{
	padding: 10px;
	border: 1px solid #ccc;
	background-color: white;
	font-size: 1.1em;
	margin-top: 10px;
	margin-bottom: 10px;
}

#donate {
	padding: 10px;
	border: 1px solid #b83746;
	background-color: white;
	font-size: 1.1em;
	margin-top: 10px;
	margin-bottom: 10px;
}

#characterDisplay{
	float: left;
	font-size: 35pt;
	line-height: 215px;
	padding-left: 50px;
}
#footer{
	color: #aaa;
	font-size: 0.8em;
	float: right;
}
li{
	font-size: 10pt;
}
.left{
	float: left;
}
.right{
	float:right;
}

.clear {
	clear: both;
}

.curve{
	-moz-border-radius: 5px;
	border-radius: 5px;
	-webkit-border-radius: 5px;
	-khtml-border-radius: 5px;
}

.description{
	background-color: white;
	font-size: 11pt;
	border: 1px solid #ccc;
	padding: 10px;
	width: 95%;
	-moz-border-radius: 5px;
	border-radius: 5px;
	-webkit-border-radius: 5px;
	-khtml-border-radius: 5px;
	margin-bottom: 10px;
}

.popup{
	display: none;
	position: absolute;
	background-color: white;
	color: #444;
	padding: 8px;
	border: 1px solid #b83746;
	box-shadow: 0 0.09em 0.05em #b83746;
	-moz-border-radius: 5px;
	border-radius: 5px;
	-webkit-border-radius: 5px;
	-khtml-border-radius: 5px;
}

.popup-new{
	position: absolute;
	background-color: white;
	color: #444;
	padding: 8px;
	border: 1px solid #b83746;
	box-shadow: 0 0.09em 0.05em #b83746;
	border-radius: 5px;
	top: 30px;
	z-index: 10;
	width: 200%;
	word-wrap: break-word;
}

.mandarin{
	position: relative;
	float: right;
	margin-bottom: -45px;
	top: -30px;
}

.submit-btn {
	margin-left: 5px;
}

.metainfo li{
	list-style-type: square;
}

.justify {
	text-align: justify;
}

.btn.large-cta {
	height: 100px;
    width: 100%;
    font-size: 2em;
    background: #97d5fd;
    color: white;
    border-color: #47a6de;
    text-shadow: none;
}

.btn.large-cta.donate {
	height: 75px;
}
.btn.small-cta {
    background: #97d5fd;
    color: white;
    border-color: #47a6de;
    text-shadow: none;
    padding: 4px 25px;
}
.emoji-donate {
	font-size: 1.5em;
    position: relative;
    top: 4px;
}
.emoji-newsbite {
	font-size: 1.5em;
	line-height: 1em;
	position: relative;
    top: 3px;
}
#donate {
	text-align: center;
}
.dollar-donation {

}

.chinese-character-list {
	list-style-type: square;
}

/* Lists Page Modern Design */
.lists-page {
	max-width: 800px;
	margin: 0 auto;
}

.lists-header {
	text-align: center;
	margin-bottom: 40px;
}

.lists-header h2 {
	color: #b83746;
	font-size: 2em;
	margin-bottom: 16px;
}

.lists-intro {
	font-size: 1.1em;
	color: #555;
	max-width: 600px;
	margin: 0 auto 12px auto;
}

.lists-contact {
	font-size: 0.95em;
	color: #888;
}

.lists-grid {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.lists-grid-2x2 {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}

.lists-page .list-card {
	display: flex;
	align-items: center;
	padding: 24px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 12px;
	text-decoration: none;
	color: inherit;
	transition: all 0.2s ease;
	box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.lists-page .list-card:hover {
	border-color: #b83746;
	box-shadow: 0 4px 12px rgba(184,55,70,0.12);
	transform: translateY(-2px);
	text-decoration: none;
	color: inherit;
}

.lists-page .list-card-disabled {
	opacity: 0.7;
	cursor: default;
	background: #fafafa;
}

.lists-page .list-card-disabled:hover {
	border-color: #e0e0e0;
	box-shadow: 0 2px 4px rgba(0,0,0,0.04);
	transform: none;
}

.lists-page .list-card-cta {
	background: linear-gradient(135deg, #fff5f6 0%, #fff 100%);
	border-color: #b83746;
	border-width: 2px;
}

.lists-page .list-card-cta:hover {
	background: linear-gradient(135deg, #ffebee 0%, #fff 100%);
}

.list-card-icon {
	font-size: 2.5em;
	margin-right: 20px;
	flex-shrink: 0;
	width: 60px;
	text-align: center;
}

.list-card-content {
	flex: 1;
}

.lists-page .list-card-content h3 {
	color: #333;
	font-size: 1.25em;
	margin: 0 0 8px 0;
	line-height: 1.3;
}

.lists-page .list-card:hover .list-card-content h3 {
	color: #b83746;
}

.lists-page .list-card-content p {
	color: #666;
	font-size: 0.95em;
	margin: 0;
	line-height: 1.5;
}

.list-card-badge {
	display: inline-block;
	background: #f0f0f0;
	color: #888;
	font-size: 0.75em;
	padding: 3px 10px;
	border-radius: 12px;
	margin-left: 8px;
	vertical-align: middle;
	position: relative;
	top: -2px;
}

.list-card-arrow {
	font-size: 1.5em;
	color: #ccc;
	margin-left: 16px;
	flex-shrink: 0;
	transition: all 0.2s ease;
}

.lists-page .list-card:hover .list-card-arrow {
	color: #b83746;
	transform: translateX(4px);
}

.lists-cta {
	color: #888;
	font-size: 0.95em;
}

.lists-cta a {
	color: #b83746;
	font-weight: 600;
}

.lists-section-title {
	color: #333;
	font-size: 1.4em;
	margin: 36px 0 4px 0;
}

.lists-section-desc {
	color: #888;
	font-size: 0.95em;
	margin: 0 0 16px 0;
}

.hsk-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
}

.hsk-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 20px 12px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	text-decoration: none;
	color: inherit;
	transition: all 0.2s ease;
	box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.hsk-card:hover {
	border-color: #b83746;
	box-shadow: 0 4px 12px rgba(184,55,70,0.12);
	transform: translateY(-2px);
	text-decoration: none;
	color: inherit;
}

.hsk-level {
	font-size: 1.15em;
	font-weight: 700;
	color: #333;
}

.hsk-card:hover .hsk-level {
	color: #b83746;
}

.hsk-desc {
	font-size: 0.85em;
	color: #888;
	margin-top: 4px;
}

@media (max-width: 600px) {
	.lists-header h2 {
		font-size: 1.6em;
	}

	.lists-page .list-card {
		padding: 16px;
	}

	.list-card-icon {
		font-size: 2em;
		width: 45px;
		margin-right: 14px;
	}

	.lists-page .list-card-content h3 {
		font-size: 1.1em;
	}

	.lists-page .list-card-content p {
		font-size: 0.9em;
	}

	.list-card-arrow {
		display: none;
	}

	.lists-grid-2x2 {
		grid-template-columns: 1fr;
	}

	.hsk-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

.frequency-list .list {
	border: 1px solid #eee;
	width: 48px;
	text-align: center;
}

.frequency-list .list.list-component {
	width: 70px;
}

.frequency-list .list a {
	font-size: 1.2em;
}

.frequency-list .list span {
	display: block;
}

.input-char-form {
	margin: 0px;
}

.character-tabs ol {
	margin: 0px;
	list-style: none;
	margin-top: 16px;
	padding: 0px;
}

.character-tabs ol li {
	border: 1px solid #ccc;
    width: 19px;
    font-size: 1.2em;
    padding: 16px 8px;
    border-radius: 3px 3px 0px 0px;
    position: relative;
    top: 4px;
    display: inline-block;
}

.top-anchor {
	position: relative;
    top: -40px;
    font-size: 0.7em;
}

.mobile-cta {
	border: 1px solid #c62742;
	border-radius: 3px;
	float: right;
	width: 300px;
}

@media(max-width: 1200px){
	.title h1 {
		font-size: 2.5em;
	}
}
@media(max-width: 979px){
	.mandarin{
		float: left;
		position: initial;
		top: 0px;
		margin-bottom: 0;
	}

	.mobile-banner {
		position: relative;
		margin-bottom: 5px;
	}
}

@media(max-width: 767px){
	.mandarin{
		float: left;
		position: initial;
		top: 0px;
		margin-bottom: 0;
	}

	.mobile-banner {
		position: absolute;
		margin-bottom: 0px;
	}
}

@media(max-width: 710px){
	.mobile-banner {
		position: relative;
		margin-bottom: 5px;
	}
}


@media(max-width: 654px){
	.mandarin{
		float: left;
		position: initial;
		top: 0px;
		margin-bottom: 0;
	}
}

@media(max-width: 767px){
	#header{
		position: static;
	}
	.header-links-desktop{
		display: none;
	}
	.header-links-mobile{
		display: flex;
		width: 100%;
		padding: 4px 12px 8px;
	}
	.header-inner{
		padding: 8px 12px;
		flex-wrap: nowrap;
	}
	.headerleft{
		flex-shrink: 1;
		gap: 0px;
		min-width: 0;
	}
	.signup-link{
		display: none;
	}
	.title h1 {
		font-size: 1.5em;
	}
	.links{
		font-size: 0.9em;
	}
	.character-actions{
		flex-direction: column !important;
		align-items: flex-end !important;
		gap: 6px;
	}
	.status-selector{
		margin-right: 0 !important;
	}
}

@media(max-width: 550px){
	.newsbite {
		/*overflow: hidden;
		text-overflow: ellipsis;*/
		font-size: 0.75em;
	    padding: 2px 8px;
	}
	.headerleft {
		flex-wrap: nowrap;
		min-width: 0;
	}
}

@media (max-width: 480px){
	.title h1 {
		font-size: 1.2em;
	}
	h1{
		font-size: 2em;
		margin-top: 0px;
		margin-bottom: -5px;
	}
	h3{
		font-size: 1.2em;
		margin: 0px;
		padding: 0px;
		line-height: 1.2em;
	}

	.decomptitle{
		display: inline-block;
		border: 1px solid #ccc;
	}
	.decompbox{
		width: 60%;
		border: 1px solid #ccc;
	}
	.decomp{
		display: inline-block;
		font-size: 0.65em;
	}

	.links{
		font-size: 1em;
	}
}

@media(max-width: 450px){ 
	.mobile-banner {
		width: 100%;
	}
	.header-link {
		font-size: 0.8em;
	}
}

@media(max-width: 330px) {
	#input {
		width: 65%;
	}
}