
/* Gaiha selectable full-width page template. This is intentionally scoped to
 * body.gbs-fullwidth-page so normal theme pages keep their original layout. */
body.gbs-fullwidth-page #gbs-fullwidth-main,
body.gbs-fullwidth-page .gbs-fullwidth-template,
body.gbs-fullwidth-page .gbs-fullwidth-article,
body.gbs-fullwidth-page .gbs-fullwidth-content {
	display: block !important;
	width: 100% !important;
	max-width: none !important;
	min-width: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	outline: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

body.gbs-fullwidth-page .gbs-fullwidth-template::before,
body.gbs-fullwidth-page .gbs-fullwidth-template::after,
body.gbs-fullwidth-page .gbs-fullwidth-article::before,
body.gbs-fullwidth-page .gbs-fullwidth-article::after,
body.gbs-fullwidth-page .gbs-fullwidth-content::before,
body.gbs-fullwidth-page .gbs-fullwidth-content::after {
	display: none !important;
	content: none !important;
}

body.gbs-fullwidth-page .gbs-fullwidth-content > :first-child {
	margin-top: 0 !important;
}

body.gbs-fullwidth-page .gbs-fullwidth-content > :last-child {
	margin-bottom: 0 !important;
}

.gbs-bookshelf-page .wp-block-post-title,
.gbs-bookshelf-page main .entry-title,
.gbs-bookshelf-page main .page-title,
.gbs-bookshelf-page main article.page > .entry-header,
.gbs-bookshelf-page main .page-header,
.gbs-bookshelf-page main .page-title-area,
.gbs-bookshelf-page main .page-title-wrap,
.gbs-bookshelf-page main .title-area,
.gbs-bookshelf-page main .entry-header,
.gbs-bookshelf-page main .post-header,
.gbs-bookshelf-page main .page-heading,
.gbs-bookshelf-page main .page-banner,
.gbs-bookshelf-page main .page-title-section,
.gbs-bookshelf-page main .page-header-wrapper,
.gbs-bookshelf-page .site-content > .page-header,
.gbs-bookshelf-page .site-content > .page-title-area,
.gbs-theme-page-panel-removed {
	display: none !important;
}

body.gbs-bookshelf-page #content,
body.gbs-bookshelf-page .site-content,
body.gbs-bookshelf-page #primary,
body.gbs-bookshelf-page .content-area,
body.gbs-bookshelf-page main,
body.gbs-bookshelf-page .site-main,
body.gbs-bookshelf-page article.page,
body.gbs-bookshelf-page .entry-content,
body.gbs-bookshelf-page .wp-block-post-content,
body.gbs-bookshelf-page .site-content > .container,
body.gbs-bookshelf-page #content > .container,
.gbs-theme-shell-reset {
	width: 100% !important;
	max-width: none !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	outline: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

body.gbs-bookshelf-page main::before,
body.gbs-bookshelf-page main::after,
body.gbs-bookshelf-page article.page::before,
body.gbs-bookshelf-page article.page::after,
.gbs-theme-shell-reset::before,
.gbs-theme-shell-reset::after {
	display: none !important;
	content: none !important;
}

.gbs-bookshelf-page .wp-block-post-content,
.gbs-bookshelf-page main .entry-content {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

.gbs-bookshelf {
	--gbs-accent: #0a84ff;
	--gbs-glass-alpha: .62;
	--gbs-text: #162033;
	--gbs-muted: #687386;
	--gbs-line: rgba(255, 255, 255, .55);
	--gbs-fixed-header-offset: 0px;
	position: relative;
	isolation: isolate;
	width: 100%;
	min-height: 680px;
	margin-top: calc(var(--gbs-fixed-header-offset) + 36px);
	margin-bottom: 32px;
	padding: clamp(18px, 4vw, 54px);
	overflow: hidden;
	border-radius: clamp(22px, 3vw, 38px);
	color: var(--gbs-text);
	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
	background:
		linear-gradient(135deg, rgba(224, 239, 255, .9), rgba(246, 241, 255, .76) 46%, rgba(224, 250, 245, .82)),
		var(--gbs-background-image, none) center / cover no-repeat;
	box-sizing: border-box;
}

.gbs-bookshelf.gbs-fullwidth {
	width: min(calc(100vw - 24px), 1600px);
	max-width: none !important;
	margin-left: calc(50% - min(calc(50vw - 12px), 800px));
}

.gbs-bookshelf *,
.gbs-bookshelf *::before,
.gbs-bookshelf *::after { box-sizing: border-box; }

.gbs-bookshelf button,
.gbs-bookshelf input,
.gbs-bookshelf select { font: inherit; }

.gbs-bookshelf button { cursor: pointer; }

.gbs-mongolian-text {
	display: inline-block;
	font-family: var(--gbs-ui-font, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif) !important;
	line-height: 1.35;
	letter-spacing: .02em !important;
	white-space: normal;
	-webkit-text-orientation: sideways-right !important;
	text-orientation: sideways !important;
	-webkit-writing-mode: vertical-lr !important;
	writing-mode: vertical-lr !important;
}

.gbs-horizontal-text {
	-webkit-writing-mode: horizontal-tb !important;
	writing-mode: horizontal-tb !important;
}

.gbs-ambient {
	position: absolute;
	z-index: -1;
	width: 430px;
	height: 430px;
	border-radius: 50%;
	filter: blur(24px);
	opacity: .48;
	pointer-events: none;
}

.gbs-ambient-one {
	top: -210px;
	right: -120px;
	background: radial-gradient(circle, rgba(66, 165, 255, .92), rgba(66, 165, 255, 0) 70%);
}

.gbs-ambient-two {
	bottom: -280px;
	left: -170px;
	background: radial-gradient(circle, rgba(170, 112, 255, .6), rgba(170, 112, 255, 0) 70%);
}

.gbs-shell {
	position: relative;
	z-index: 1;
	max-width: 1380px;
	margin: 0 auto;
}

.gbs-glass,
.gbs-book-glass {
	border: 1px solid var(--gbs-line);
	background: rgba(255, 255, 255, var(--gbs-glass-alpha));
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, .76),
		0 20px 55px rgba(47, 67, 104, .12);
	-webkit-backdrop-filter: blur(28px) saturate(150%);
	backdrop-filter: blur(28px) saturate(150%);
}

.gbs-hero {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 176px;
	padding: clamp(26px, 5vw, 52px);
	border-radius: 32px;
	background:
		linear-gradient(135deg, rgba(255, 255, 255, .82), rgba(247, 249, 255, .7)),
		var(--gbs-hero-background-image, none) center / cover no-repeat;
}

.gbs-hero-vertical {
	min-height: 330px;
	align-items: flex-start;
}

.gbs-hero-copy {
	display: flex;
	width: 100%;
	min-width: 0;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
}

.gbs-hero-copy-vertical {
	justify-content: flex-start;
}

.gbs-eyebrow {
	margin: 0 0 8px !important;
	color: var(--gbs-accent);
	font-size: 12px !important;
	font-weight: 720;
	line-height: 1.3;
	letter-spacing: .16em;
	text-transform: uppercase;
}

.gbs-library-title {
	margin: 0 !important;
	color: var(--gbs-title-color, var(--gbs-text));
	font-family: var(--gbs-title-font, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif);
	font-size: clamp(28px, var(--gbs-title-size, 56px), 96px) !important;
	font-weight: 760;
	line-height: 1.08 !important;
	white-space: pre-wrap;
}

.gbs-title-horizontal {
	letter-spacing: -.045em;
}

.gbs-title-vertical {
	width: max-content;
	max-width: 100%;
	height: 220px;
	max-height: 45vh;
	margin-right: auto !important;
	margin-left: auto !important;
	line-height: 1.4 !important;
	letter-spacing: .02em;
	text-align: start;
	-webkit-text-orientation: sideways-right;
	text-orientation: sideways-right;
	text-orientation: sideways;
	writing-mode: vertical-lr;
}


/* v2.3.23: multilingual bookshelf PAGE TITLE ONLY. */
.gbs-page-titles {
	display:flex !important;
	align-items:center !important;
	justify-content:center !important;
	width:100% !important;
	min-height:280px !important;
	gap:clamp(24px,4vw,60px) !important;
	margin:0 auto !important;
	padding:0 !important;
	flex-wrap:wrap !important;
	text-align:center !important;
}
.gbs-page-title-column {
	display:flex !important;
	flex:0 0 auto !important;
	flex-direction:column !important;
	align-items:center !important;
	justify-content:center !important;
	width:1.25em !important;
	min-width:1.25em !important;
	height:auto !important;
	min-height:0 !important;
	max-height:none !important;
	overflow:visible !important;
	margin:0 auto !important;
	font-size:clamp(48px,68px,88px) !important;
	font-weight:760 !important;
	line-height:1 !important;
	color:var(--gbs-title-color,var(--gbs-text)) !important;
	white-space:nowrap !important;
	text-align:center !important;
}
.gbs-page-title-column span {
	display:flex !important;
	align-items:center !important;
	justify-content:center !important;
	width:1.15em !important;
	height:1.15em !important;
	flex:0 0 1.15em !important;
	line-height:1 !important;
	text-align:center !important;
	transform:none !important;
	transform-origin:center !important;
}
.gbs-page-title-column-mongolian {
	display:block !important;
	width:1.7em !important;
	min-width:1.7em !important;
	height:4.6em !important;
	min-height:220px !important;
	max-height:70vh !important;
	max-width:45% !important;
	white-space:normal !important;
	writing-mode:vertical-rl !important;
	-webkit-writing-mode:vertical-rl !important;
	text-orientation:mixed !important;
	direction:ltr !important;
	transform:none !important;
}
.gbs-page-title-column-mongolian > span {
	display:inline !important;
	width:auto !important;
	height:auto !important;
	white-space:normal !important;
	line-height:1 !important;
	transform:none !important;
}
@media (max-width:760px) {
	.gbs-page-titles {
		min-height:240px !important;
		gap:18px !important;
	}
	.gbs-page-title-column {
		font-size:clamp(42px,16vw,60px) !important;
	}
	.gbs-page-title-column-mongolian {
		height:4.2em !important;
		min-height:190px !important;
	}
}

.gbs-library-title-image-wrap {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: fit-content;
	max-width: 100%;
	margin: 0 auto;
	padding: 10px 14px;
	border-radius: 28px;
	text-align: center;
}

.gbs-library-title-image {
	display: block;
	width: min(100%, var(--gbs-title-image-width, 220px));
	max-width: 100%;
	height: auto;
	margin: 0 auto;
	object-fit: contain;
	object-position: center center;
}

.gbs-title-image-effect-none {
	background: transparent;
	box-shadow: none;
	backdrop-filter: none;
}

.gbs-title-image-effect-glow {
	background: rgba(255, 255, 255, .18);
	box-shadow: 0 18px 44px rgba(66, 98, 146, .18), inset 0 1px 0 rgba(255,255,255,.72);
	backdrop-filter: blur(10px) saturate(1.18);
}

.gbs-title-image-effect-float {
	background: rgba(255, 255, 255, .14);
	box-shadow: 0 22px 48px rgba(37, 64, 105, .18), inset 0 1px 0 rgba(255,255,255,.68);
	backdrop-filter: blur(12px) saturate(1.16);
	animation: gbsTitleFloat 4.8s ease-in-out infinite;
}

.gbs-title-image-effect-pulse {
	background: rgba(255, 255, 255, .16);
	box-shadow: 0 0 0 rgba(10, 132, 255, 0);
	backdrop-filter: blur(10px) saturate(1.16);
	animation: gbsTitlePulse 2.8s ease-in-out infinite;
}

.gbs-title-image-effect-glass {
	background: linear-gradient(145deg, rgba(255,255,255,.42), rgba(255,255,255,.14));
	border: 1px solid rgba(255,255,255,.5);
	box-shadow: inset 0 1px 0 rgba(255,255,255,.82), 0 24px 48px rgba(42, 67, 103, .18);
	backdrop-filter: blur(16px) saturate(1.2);
}

@keyframes gbsTitleFloat {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-6px); }
}

@keyframes gbsTitlePulse {
	0%, 100% { box-shadow: 0 12px 28px rgba(65, 93, 138, .12), 0 0 0 0 rgba(10,132,255,.14); }
	50% { box-shadow: 0 18px 40px rgba(65, 93, 138, .18), 0 0 0 12px rgba(10,132,255,0); }
}

.gbs-count {
	display: inline-flex;
	align-items: flex-start;
	gap: 4px;
	margin: 12px 0 0 !important;
	color: var(--gbs-muted);
	font-size: 14px !important;
	line-height: 1.4;
}

.gbs-hero-symbol {
	position: absolute;
	top: clamp(26px, 5vw, 52px);
	right: clamp(26px, 5vw, 52px);
	display: grid;
	align-items: center;
	justify-items: center;
	width: 90px;
	height: 90px;
	place-items: center;
	border: 1px solid rgba(255, 255, 255, .66);
	border-radius: 26px;
	background: linear-gradient(145deg, rgba(255, 255, 255, .86), rgba(255, 255, 255, .3));
	box-shadow: inset 0 1px 0 #fff, 0 15px 35px rgba(55, 92, 145, .14);
}

.gbs-hero-symbol svg {
	width: 54px;
	height: 54px;
	fill: none;
	stroke: var(--gbs-accent);
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 2.8;
}

.gbs-toolbar {
	display: grid;
	grid-template-columns: minmax(220px, 1fr) auto auto;
	gap: 12px;
	margin: 18px 0 30px;
	padding: 12px;
	border-radius: 22px;
}

.gbs-select-wrap {
	position: relative;
	display: flex;
	align-items: center;
	height: 48px;
	margin: 0;
	border: 1px solid rgba(133, 148, 173, .14);
	border-radius: 15px;
	background: rgba(255, 255, 255, .54);
}

.gbs-select-wrap:focus-within {
	border-color: color-mix(in srgb, var(--gbs-accent) 55%, transparent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--gbs-accent) 14%, transparent);
}


.gbs-select-wrap select {
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0 16px;
	border: 0 !important;
	border-radius: inherit;
	outline: 0 !important;
	color: var(--gbs-text);
	background: transparent !important;
	box-shadow: none !important;
	font-size: 14px !important;
}

.gbs-select-wrap select { min-width: 138px; padding-right: 34px; cursor: pointer; }

.gbs-select-wrap.gbs-has-mongolian {
	height: 132px;
	align-items: flex-start;
}



.gbs-select-wrap select.gbs-mongolian-text {
	height: 126px;
	min-width: 64px;
	padding: 10px 12px;
}

.gbs-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 28px 22px;
}

.gbs-book {
	position: relative;
	min-width: 0;
	margin: 0 !important;
	transition: opacity .22s ease, transform .22s ease;
}

.gbs-book[hidden] { display: none !important; }

.gbs-book-glass {
	position: relative;
	z-index: 2;
	height: 100%;
	padding: 14px;
	border-radius: 24px;
	transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s ease, border-color .3s ease;
}

.gbs-book:hover .gbs-book-glass,
.gbs-book:focus-within .gbs-book-glass {
	transform: translateY(-7px);
	border-color: rgba(255, 255, 255, .88);
	box-shadow: inset 0 1px 0 #fff, 0 24px 62px rgba(49, 69, 105, .2);
}

.gbs-cover-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 3 / 4.15;
	overflow: hidden;
	border-radius: 16px;
	background: rgba(222, 228, 238, .7);
	box-shadow: 0 13px 28px rgba(31, 42, 65, .17);
}

.gbs-cover {
	display: block;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	border: 0 !important;
	object-fit: cover;
	transition: transform .45s cubic-bezier(.2, .8, .2, 1);
}

.gbs-book:hover .gbs-cover { transform: scale(1.025); }

.gbs-cover-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 22px;
	color: var(--gbs-muted);
	text-align: center;
	background:
		linear-gradient(145deg, rgba(255, 255, 255, .75), rgba(221, 229, 240, .88));
}

.gbs-cover-placeholder::before {
	position: absolute;
	inset: 10px;
	border: 1px dashed rgba(104, 115, 134, .3);
	border-radius: 11px;
	content: "";
}

.gbs-cover-placeholder span {
	font-family: ui-serif, Georgia, serif;
	font-size: 64px;
	font-weight: 700;
	line-height: 1;
}

.gbs-cover-placeholder small {
	position: relative;
	margin-top: 0;
	font-size: 14px;
	font-weight: 650;
	line-height: 1.45;
}

.gbs-cover-placeholder small.gbs-mongolian-text {
	max-height: calc(100% - 44px);
	font-family: var(--gbs-ui-font, inherit) !important;
}

.gbs-access-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	max-width: calc(100% - 20px);
	overflow: hidden;
	padding: 5px 8px;
	border: 1px solid rgba(255, 255, 255, .68);
	border-radius: 999px;
	color: #fff;
	font-size: 9px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: .06em;
	text-overflow: ellipsis;
	white-space: nowrap;
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
}

.gbs-access-badge.is-free { background: #329253; }
.gbs-access-badge.is-paid,
.gbs-access-badge.is-registered { background: #d94444; }
.gbs-access-badge.gbs-mongolian-text {
	max-width: none;
	max-height: calc(100% - 20px);
	overflow: visible;
	padding: 8px 6px;
	line-height: 1.25;
	letter-spacing: 0 !important;
	text-overflow: clip;
	white-space: normal;
}
.gbs-login-required { background: #d65b37 !important; }

.gbs-registered-gate {
	max-width: 620px;
	margin: 36px auto;
	padding: 34px;
	border: 1px solid rgba(255, 255, 255, .76);
	border-radius: 24px;
	box-shadow: 0 20px 55px rgba(30, 52, 88, .12);
	color: #172033;
	text-align: center;
	background: rgba(244, 248, 255, .82);
	-webkit-backdrop-filter: blur(24px) saturate(145%);
	backdrop-filter: blur(24px) saturate(145%);
}

.gbs-registered-gate h3 { margin: 0 0 10px !important; font-size: 24px !important; }
.gbs-registered-gate p { margin: 0 0 22px !important; color: #667085; }
.gbs-registered-gate-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 22px;
	border-radius: 14px;
	color: #fff !important;
	font-weight: 700;
	text-decoration: none !important;
	background: #0a84ff;
}

.gbs-book-info { padding: 16px 3px 2px; }

.gbs-book-info h3 {
	display: -webkit-box;
	min-height: 2.8em;
	margin: 0 !important;
	overflow: hidden;
	color: var(--gbs-text);
	font-size: 16px !important;
	font-weight: 720;
	line-height: 1.4 !important;
	letter-spacing: -.015em;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.gbs-book-title-wrap {
	min-height: 2.8em;
}

.gbs-book-title-wrap.is-mongolian-title {
	height: 45px;
	min-height: 45px;
	overflow: hidden;
}

.gbs-book-info h3.gbs-card-title-mongolian {
	display: flex;
	align-items: flex-start;
	gap: .1em;
	width: 100%;
	max-width: 100%;
	height: 45px;
	min-height: 45px;
	max-height: 45px;
	margin: 0 !important;
	overflow: hidden;
	font-family: var(--gbs-ui-font, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif) !important;
	font-size: 9px !important;
	line-height: 1.1 !important;
	letter-spacing: -.04em;
	white-space: normal;
	direction: ltr;
	unicode-bidi: isolate;
	-webkit-text-orientation: mixed !important;
	text-orientation: mixed !important;
	-webkit-writing-mode: horizontal-tb !important;
	writing-mode: horizontal-tb !important;
	transform: none !important;
}

.gbs-mongolian-title-column {
	position: relative;
	display: block;
	flex: 0 0 1.2em;
	height: 100%;
	overflow: hidden;
}

.gbs-mongolian-title-word {
	position: absolute;
	top: 5px;
	left: 1.1em;
	display: block;
	font-family: inherit;
	line-height: 1.1;
	letter-spacing: -.04em;
	white-space: nowrap;
	-webkit-text-orientation: mixed !important;
	text-orientation: mixed !important;
	-webkit-writing-mode: horizontal-tb !important;
	writing-mode: horizontal-tb !important;
	transform: rotate(90deg);
	transform-origin: top left;
}

.gbs-content-type {
	margin: 7px 0 0 !important;
	color: var(--gbs-accent);
	font-size: 11px !important;
	font-weight: 800;
	line-height: 1.35 !important;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.gbs-content-type.gbs-mongolian-text {
	max-height: 6.5em;
	text-transform: none;
}

.gbs-author,
.gbs-meta {
	overflow: hidden;
	margin: 7px 0 0 !important;
	color: var(--gbs-muted);
	font-size: 12px !important;
	line-height: 1.45 !important;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.gbs-meta { margin-top: 3px !important; color: #8a94a4; font-size: 11px !important; }

.gbs-author.gbs-has-mongolian,
.gbs-meta.gbs-has-mongolian {
	display: flex;
	align-items: flex-start;
	gap: 3px;
	min-height: 5.8em;
	overflow: visible;
	text-overflow: clip;
	white-space: normal;
}

.gbs-meta-separator { white-space: pre; }

.gbs-actions {
	display: flex;
	gap: 8px;
	margin-top: 14px;
}

.gbs-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	margin: 0 !important;
	padding: 0 14px;
	border: 0 !important;
	border-radius: 12px;
	text-decoration: none !important;
	box-shadow: none;
	transition: transform .18s ease, opacity .18s ease, box-shadow .18s ease;
}

.gbs-button:hover { transform: translateY(-1px); opacity: .92; }
.gbs-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.gbs-button-primary { flex: 1; gap: 7px; color: #fff !important; background: var(--gbs-accent) !important; font-size: 13px; font-weight: 680; box-shadow: 0 7px 16px color-mix(in srgb, var(--gbs-accent) 24%, transparent); }
.gbs-button-icon { width: 38px; padding: 0; color: var(--gbs-text) !important; background: rgba(255, 255, 255, .7) !important; }

.gbs-button.gbs-has-mongolian {
	min-height: 82px;
	padding-top: 8px;
	padding-bottom: 8px;
}

.gbs-actions-mongolian {
	display: grid;
	grid-template-columns: 54px minmax(0, 1fr);
	grid-template-rows: auto auto;
	align-items: start;
	justify-items: start;
	gap: 8px;
}

.gbs-actions-mongolian .gbs-button-primary {
	grid-column: 1;
	grid-row: 1;
	width: 54px;
	min-height: 116px;
	flex: none;
	flex-direction: column;
	padding: 10px 7px;
}

.gbs-actions-mongolian .gbs-button-icon {
	grid-column: 1;
	grid-row: 2;
	width: 54px;
	min-height: 40px;
}

.gbs-vertical-details {
	display: flex;
	grid-column: 2;
	grid-row: 1 / span 2;
	flex-flow: row wrap;
	align-items: center;
	align-self: start;
	gap: 4px 7px;
	min-height: 0;
	padding: 7px 0 0 2px;
}

.gbs-vertical-detail {
	display: inline-block;
	max-width: 100%;
	color: #8a94a4;
	font-size: 11px;
	line-height: 1.35;
	letter-spacing: .03em;
	white-space: nowrap;
}

.gbs-vertical-detail:not(.gbs-mongolian-text) {
	-webkit-text-orientation: mixed !important;
	text-orientation: mixed !important;
	-webkit-writing-mode: horizontal-tb !important;
	writing-mode: horizontal-tb !important;
}

.gbs-vertical-format {
	color: var(--gbs-accent);
	font-weight: 800;
	letter-spacing: .08em;
}

.gbs-vertical-size::before {
	margin-right: 7px;
	color: #a1a9b7;
	content: "·";
}

.gbs-shelf-edge {
	position: relative;
	z-index: 1;
	width: calc(100% - 12px);
	height: 13px;
	margin: -5px auto 0;
	border: 1px solid rgba(255, 255, 255, .62);
	border-radius: 0 0 14px 14px;
	background: linear-gradient(180deg, rgba(255, 255, 255, .76), rgba(192, 209, 232, .32));
	box-shadow: 0 13px 22px rgba(55, 74, 110, .17), inset 0 1px 0 #fff;
	-webkit-backdrop-filter: blur(16px);
	backdrop-filter: blur(16px);
}

.gbs-empty {
	padding: 70px 24px;
	border-radius: 24px;
	color: var(--gbs-muted);
	text-align: center;
}

.gbs-empty .gbs-mongolian-text {
	max-height: 12em;
}

.gbs-reader[hidden] { display: none !important; }

.gbs-reader {
	position: fixed;
	z-index: 2147483646;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 18px;
	color: #172033;
	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

.gbs-reader-backdrop {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(178,194,214,.55), rgba(144,169,195,.66));
	-webkit-backdrop-filter: blur(34px) saturate(138%);
	backdrop-filter: blur(34px) saturate(138%);
}

.gbs-reader-panel {
	position: relative;
	display: grid;
	grid-template-rows: auto 1fr;
	width: min(1180px, 96vw);
	height: min(880px, 94vh);
	overflow: hidden;
	border: 1px solid rgba(255,255,255,.84);
	border-radius: 28px;
	background: linear-gradient(180deg, rgba(229,239,249,.91), rgba(196,215,234,.86));
	box-shadow: 0 42px 120px rgba(49,65,87,.30), 0 14px 42px rgba(76,100,132,.18), inset 0 1px 0 rgba(255,255,255,.96);
	-webkit-backdrop-filter: blur(38px) saturate(145%);
	backdrop-filter: blur(38px) saturate(145%);
	animation: gbs-reader-in .25s cubic-bezier(.2, .8, .2, 1);
}

@keyframes gbs-reader-in {
	from { opacity: 0; transform: translateY(14px) scale(.985); }
	to { opacity: 1; transform: none; }
}

.gbs-reader-fullscreen-fallback {
	padding: 0;
}

.gbs-reader-fullscreen-fallback .gbs-reader-backdrop {
	display: none;
}

.gbs-reader-fullscreen-fallback .gbs-reader-panel,
.gbs-reader-panel:fullscreen,
.gbs-reader-panel:-webkit-full-screen {
	width: 100vw;
	height: 100vh;
	height: 100dvh;
	max-width: none;
	max-height: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.gbs-reader-bar {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 6px 8px;
	border-bottom: 1px solid rgba(34, 47, 70, .08);
	background: linear-gradient(180deg, rgba(244,249,253,.78), rgba(222,234,246,.62));
	-webkit-backdrop-filter: blur(30px) saturate(135%);
	backdrop-filter: blur(30px) saturate(135%);
}

.gbs-reader-navigation {
	display: none !important;
	position: absolute;
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	transform: translateX(-50%);
}

.gbs-reader-navigation[hidden] { display: none !important; }

.gbs-reader-navigation button {
	display: inline-grid;
	width: 34px;
	height: 34px;
	padding: 0;
	place-items: center;
	border: 1px solid rgba(30, 42, 61, .08) !important;
	border-radius: 10px;
	color: #344054;
	background: rgba(229, 234, 242, .76) !important;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}

.gbs-reader-navigation button { font-size: 23px; line-height: 1; }
.gbs-reader-navigation button:disabled { opacity: .35; cursor: default; }
.gbs-reader-navigation select { width: min(260px, 28vw); height: 34px; margin: 0; padding: 0 28px 0 10px; border: 1px solid rgba(30, 42, 61, .08); border-radius: 10px; background-color: rgba(229, 234, 242, .76); font-size: 12px; }
.gbs-reader-navigation span { min-width: 42px; color: #788397; font-size: 11px; text-align: center; }

.gbs-reader-actions {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	justify-self: center;
}

.gbs-reader-icon {
	display: inline-grid;
	width: 30px;
	height: 30px;
	padding: 0 !important;
	place-items: center;
	border: 1px solid rgba(105,125,151,.12) !important;
	border-radius: 10px;
	color: #64758a;
	background: linear-gradient(180deg, rgba(248,251,254,.91), rgba(215,228,241,.66)) !important;
	box-shadow: inset 0 1px 0 rgba(255,255,255,.98), 0 8px 20px rgba(72,93,121,.12);
	opacity: .88;
	transition: background .16s ease, color .16s ease, opacity .16s ease;
}

.gbs-reader-icon:hover,
.gbs-reader-icon:focus-visible {
	color: #475569;
	background: rgba(226, 232, 240, .88) !important;
	opacity: 1;
}

.gbs-reader-icon svg {
	width: 15px;
	height: 15px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.65;
}


.gbs-reader-font span { font-size: 11px; font-weight: 760; line-height: 1; }
.gbs-reader-turn[hidden] { display:none !important; }
.gbs-reader-turn { position:absolute; z-index:12; top:52%; display:grid; place-items:center; width:44px; height:44px; padding:0!important; border:1px solid rgba(255,255,255,.72)!important; border-radius:50%; color:#708197; background:rgba(245,250,253,.52)!important; box-shadow:0 10px 28px rgba(62,82,105,.10), inset 0 1px 0 rgba(255,255,255,.96); -webkit-backdrop-filter:blur(18px); backdrop-filter:blur(18px); transform:translateY(-50%); }
.gbs-reader-turn-prev{left:18px}.gbs-reader-turn-next{right:18px}.gbs-reader-turn svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.gbs-reader-fullscreen .gbs-icon-exit-fullscreen { display: none; }
.gbs-reader-fullscreen.is-fullscreen .gbs-icon-enter-fullscreen { display: none; }
.gbs-reader-fullscreen.is-fullscreen .gbs-icon-exit-fullscreen { display: block; }

.gbs-reader-body {
	position: relative;
	min-height: 0;
	overflow: hidden;
	/* v1.5.37: use a pure solid reader background instead of a gradient. */
	background: var(--gbs-reader-bg-start,#efe5b8);
	box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}

.gbs-reader-frame { width: 100%; height: 100%; border: 0; background: var(--gbs-reader-bg-start,#efe5b8); }

/* Reader advertising UI is owned entirely by Gaiha Ads.
   The bookshelf only exposes [data-gaiha-ads-reader-host] as a neutral mount point. */
.gbs-gaiha-ads-host {
	position: absolute;
	inset: 0;
	z-index: 40;
	pointer-events: none;
}
.gbs-gaiha-ads-host:empty { display: none; }
.gbs-gaiha-ads-host > * { pointer-events: auto; }

.gbs-reader-loading,
.gbs-reader-message {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 30px;
	color: #6c7789;
	text-align: center;
	background: #f4f6f9;
}

.gbs-reader-loading[hidden],
.gbs-reader-message[hidden] { display: none !important; }
.gbs-reader-loading p { margin: 14px 0 0; font-size: 13px; }

.gbs-spinner {
	width: 30px;
	height: 30px;
	border: 3px solid rgba(10, 132, 255, .18);
	border-top-color: var(--gbs-accent);
	border-radius: 50%;
	animation: gbs-spin .75s linear infinite;
}

@keyframes gbs-spin { to { transform: rotate(360deg); } }

.gbs-reader-message h3 { margin: 0 0 8px; color: #273246; font-size: 20px; }
.gbs-reader-message p { max-width: 560px; margin: 0 0 18px; font-size: 14px; line-height: 1.7; }
.gbs-reader-message a { display: inline-flex; min-height: 42px; align-items: center; padding: 0 18px; border-radius: 12px; color: white; background: var(--gbs-accent); font-size: 13px; font-weight: 650; text-decoration: none; }

.gbs-docx-view {
	height: 100%;
	max-width: none;
	margin: 0 !important;
	padding: clamp(30px, 6vw, 72px) max(24px, calc((100% - 820px) / 2));
	overflow: auto;
	color: #222b3a;
	background: transparent;
	font-family: ui-serif, Georgia, "Times New Roman", serif;
	font-size: var(--gbs-reader-font-size, 26px);
	line-height: 1.75;
}

.gbs-docx-view[hidden] { display: none !important; }
.gbs-docx-view h1, .gbs-docx-view h2, .gbs-docx-view h3 { margin: 1.4em 0 .65em; color: #121926; line-height: 1.25; }
.gbs-docx-view p { margin: 0 0 1em; }
.gbs-docx-view img { max-width: 100%; height: auto; }
.gbs-docx-view table { width: 100%; margin: 1.5em 0; border-collapse: collapse; }
.gbs-docx-view td { padding: 7px 10px; border: 1px solid #cdd4df; }



/* Server-cached DOCX reader.
 * IMPORTANT: the scroll viewport stays horizontal-tb. Only the inner content
 * uses vertical writing, so iOS WebKit cannot move the scroll origin to the
 * physical bottom of the reader. */
.gbs-docx-view.gbs-docx-cached,
.gbs-docx-view.gbs-docx-cache-viewport {
	position: absolute !important;
	inset: 0 !important;
	box-sizing: border-box !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow-x: auto !important;
	overflow-y: hidden !important;
	-webkit-overflow-scrolling: touch !important;
	overscroll-behavior-x: contain !important;
	background: var(--gbs-reader-bg-start,#efe5b8) !important;
	-webkit-writing-mode: horizontal-tb !important;
	writing-mode: horizontal-tb !important;
	-webkit-text-orientation: mixed !important;
	text-orientation: mixed !important;
	direction: ltr !important;
	text-align: left !important;
	touch-action: pan-x !important;
}

.gbs-docx-cache-content {
	position: absolute !important;
	top: 18px !important;
	left: 18px !important;
	box-sizing: border-box !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 18px 0 0 !important;
	color: #222b3a !important;
	background: var(--gbs-reader-bg-start,#efe5b8) !important;
	font-family: var(--gbs-reader-font, ui-serif, Georgia, "Times New Roman", serif) !important;
	font-size: var(--gbs-reader-font-size, 26px) !important;
	font-weight: 400 !important;
	font-style: normal !important;
	font-synthesis: none !important;
	font-variant-ligatures: common-ligatures contextual !important;
	line-height: 1.75 !important;
	text-align: start !important;
}

.gbs-docx-cache-content.is-vertical {
	height: calc(100% - 36px) !important;
	min-height: 0 !important;
	width: max-content !important;
	min-width: max-content !important;
	-webkit-writing-mode: vertical-lr !important;
	writing-mode: vertical-lr !important;
	-webkit-text-orientation: mixed !important;
	text-orientation: mixed !important;
	direction: ltr !important;
	white-space: pre-wrap !important;
	word-break: normal !important;
	overflow-wrap: normal !important;
	text-combine-upright: none !important;
	font-feature-settings: "vert" 1, "vrt2" 1 !important;
	-webkit-font-feature-settings: "vert" 1, "vrt2" 1 !important;
}

.gbs-docx-cache-content.is-vertical.is-mongolian {
	-webkit-text-orientation: sideways-right !important;
	text-orientation: sideways !important;
}

/* v2.3.25: center and enlarge horizontal BOOK reader text only.
 * The selector excludes article-reader content and all bookshelf page-title UI.
 */
.gbs-docx-view.gbs-docx-cached:not(.gbs-article-reader) > .gbs-docx-cache-content:not(.is-vertical) {
	position: absolute !important;
	top: 50% !important;
	left: 50% !important;
	width: min(820px, calc(100% - 48px)) !important;
	height: calc(100% - 48px) !important;
	min-width: 0 !important;
	min-height: 0 !important;
	max-width: 820px !important;
	box-sizing: border-box !important;
	padding: 28px 30px 44px !important;
	margin: 0 !important;
	transform: translate(-50%, -50%) !important;
	overflow-x: hidden !important;
	overflow-y: auto !important;
	font-size: var(--gbs-reader-font-size, 32px) !important;
	line-height: 1.9 !important;
	text-align: left !important;
	-webkit-writing-mode: horizontal-tb !important;
	writing-mode: horizontal-tb !important;
	text-orientation: mixed !important;
	direction: ltr !important;
}

.gbs-docx-view.gbs-docx-cached:not(.gbs-article-reader) > .gbs-docx-cache-content:not(.is-vertical) > *,
.gbs-docx-view.gbs-docx-cached:not(.gbs-article-reader) > .gbs-docx-cache-content:not(.is-vertical) p,
.gbs-docx-view.gbs-docx-cached:not(.gbs-article-reader) > .gbs-docx-cache-content:not(.is-vertical) h1,
.gbs-docx-view.gbs-docx-cached:not(.gbs-article-reader) > .gbs-docx-cache-content:not(.is-vertical) h2,
.gbs-docx-view.gbs-docx-cached:not(.gbs-article-reader) > .gbs-docx-cache-content:not(.is-vertical) h3,
.gbs-docx-view.gbs-docx-cached:not(.gbs-article-reader) > .gbs-docx-cache-content:not(.is-vertical) h4,
.gbs-docx-view.gbs-docx-cached:not(.gbs-article-reader) > .gbs-docx-cache-content:not(.is-vertical) h5,
.gbs-docx-view.gbs-docx-cached:not(.gbs-article-reader) > .gbs-docx-cache-content:not(.is-vertical) h6 {
	font-size: inherit !important;
}

.gbs-docx-cache-content.is-vertical > *,
.gbs-docx-cache-content.is-vertical p,
.gbs-docx-cache-content.is-vertical h1,
.gbs-docx-cache-content.is-vertical h2,
.gbs-docx-cache-content.is-vertical h3,
.gbs-docx-cache-content.is-vertical h4,
.gbs-docx-cache-content.is-vertical h5,
.gbs-docx-cache-content.is-vertical h6 {
	position: static !important;
	display: block !important;
	-webkit-writing-mode: inherit !important;
	writing-mode: inherit !important;
	-webkit-text-orientation: inherit !important;
	text-orientation: inherit !important;
	direction: inherit !important;
	height: auto !important;
	min-height: 0 !important;
	max-height: none !important;
	padding: 0 !important;
	margin: 0 !important;
	margin-block-end: 1.3em !important;
	text-align: start !important;
	vertical-align: top !important;
	background: transparent !important;
}

.gbs-docx-cache-content.is-vertical p:not(.gbs-docx-empty-paragraph) {
	text-indent: 2em !important;
	white-space: pre-wrap !important;
}

.gbs-docx-cache-content.is-vertical .gbs-docx-empty-paragraph {
	min-width: 1em !important;
	text-indent: 0 !important;
	margin-block-end: .8em !important;
	white-space: pre-wrap !important;
}

.gbs-docx-cache-content.is-vertical h1,
.gbs-docx-cache-content.is-vertical h2,
.gbs-docx-cache-content.is-vertical h3,
.gbs-docx-cache-content.is-vertical h4,
.gbs-docx-cache-content.is-vertical h5,
.gbs-docx-cache-content.is-vertical h6 {
	text-indent: 0 !important;
}

.gbs-docx-cache-content .gbs-docx-table-text {
	display: block !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Word-faithful single-axis punctuation.
 * Punctuation is no longer wrapped or repositioned. All characters stay in
 * the same inline flow so the active reader font controls glyph placement. */
.gbs-docx-cache-content.is-vertical.is-mongolian {
	font-kerning: normal !important;
	font-variant-position: normal !important;
}

.gbs-docx-cache-content.is-vertical.is-mongolian span {
	-webkit-writing-mode: inherit !important;
	writing-mode: inherit !important;
	-webkit-text-orientation: inherit !important;
	text-orientation: inherit !important;
	vertical-align: baseline !important;
	position: static !important;
	transform: none !important;
	margin: 0 !important;
	padding: 0 !important;
	letter-spacing: inherit !important;
	line-height: inherit !important;
}


/* v2.1.6: punctuation is not rewritten or forced upright.
 * Keep all original DOCX symbols in the same vertical Mongolian text flow on
 * desktop and mobile; this prevents 《》/<< >>/dash glyphs becoming broken
 * chevrons or short vertical bars. */

body.gbs-no-scroll { overflow: hidden !important; }

@media (max-width: 760px) {
	.gbs-bookshelf { min-height: 560px; margin-top: calc(var(--gbs-fixed-header-offset) + 24px); margin-bottom: 24px; padding: 14px; border-radius: 22px; }
	.gbs-bookshelf.gbs-fullwidth { width: 100vw; margin-left: calc(50% - 50vw); border-radius: 0; }
	.gbs-hero { min-height: 135px; padding: 24px; border-radius: 24px; }
	.gbs-hero-vertical { min-height: 270px; }
	.gbs-title-vertical { height: 180px; max-height: none; }
	.gbs-hero-symbol { top: 24px; right: 24px; width: 62px; height: 62px; border-radius: 19px; }
	.gbs-hero-symbol svg { width: 38px; height: 38px; }
	.gbs-toolbar { grid-template-columns: 1fr 1fr; margin: 12px 0 22px; gap: 8px; border-radius: 19px; }
	.gbs-search { grid-column: 1 / -1; }
	.gbs-select-wrap select { min-width: 0; }
	.gbs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 10px; }
	.gbs-book-glass { padding: 9px; border-radius: 19px; }
	.gbs-cover-wrap { border-radius: 12px; }
	.gbs-book-info { padding: 11px 1px 1px; }
	.gbs-book-info h3 { min-height: 2.7em; font-size: 14px !important; }
	.gbs-book-title-wrap.is-mongolian-title { height: 45px; min-height: 45px; }
	.gbs-book-info h3.gbs-card-title-mongolian { height: 45px; min-height: 45px; max-height: 45px; font-size: 8px !important; }
	.gbs-content-type { font-size: 10px !important; }
	.gbs-author { font-size: 11px !important; }
	.gbs-meta { display: none; }
	.gbs-actions { margin-top: 10px; }
	.gbs-button-primary { min-height: 36px; padding: 0 9px; }
	.gbs-button-icon { width: 36px; min-height: 36px; }
	.gbs-shelf-edge { height: 10px; }
	.gbs-reader { inset: var(--gbs-fixed-header-offset, 0px) 0 0; padding: 10px 5px 5px; place-items: stretch; }
	.gbs-reader-panel { width: 100%; height: 100%; border-radius: 22px; }
	.gbs-reader-bar { min-height: 42px; padding: 6px 7px; }
	.gbs-reader-actions { gap: 6px; justify-content:center; justify-self:center; }
	.gbs-reader-icon { width: 29px; height: 29px; border-radius: 9px; }
	.gbs-reader-font span { font-size:10px; }
	.gbs-reader-turn { width:38px; height:38px; }
	.gbs-reader-turn-prev{left:10px}.gbs-reader-turn-next{right:10px}
	.gbs-reader-navigation { gap: 3px; }
	.gbs-reader-navigation select { width: 30vw; }
	.gbs-reader-navigation span { display: none; }
	.gbs-docx-view { padding: 30px 20px; font-size: 16px; }
	.gbs-docx-cache-content { top: 14px !important; left: 14px !important; padding-right: 14px !important; }
	.gbs-docx-view.gbs-docx-cached:not(.gbs-article-reader) > .gbs-docx-cache-content:not(.is-vertical) {
		top: 50% !important;
		left: 50% !important;
		width: calc(100% - 28px) !important;
		height: calc(100% - 28px) !important;
		max-width: 820px !important;
		padding: 20px 18px 34px !important;
		font-size: var(--gbs-reader-font-size, 32px) !important;
		line-height: 1.85 !important;
		transform: translate(-50%, -50%) !important;
	}
	.gbs-docx-cache-content.is-vertical { height: calc(100% - 28px) !important; }

	/* v1.5.53: mobile uses the exact same single-axis Mongolian text flow as desktop. */
	.gbs-docx-cache-content.is-vertical.is-mongolian {
		-webkit-writing-mode: vertical-lr !important;
		writing-mode: vertical-lr !important;
		-webkit-text-orientation: sideways-right !important;
		text-orientation: sideways !important;
		direction: ltr !important;
		text-combine-upright: none !important;
		font-family: var(--gbs-reader-font, ui-serif, Georgia, "Times New Roman", serif) !important;
		font-size: var(--gbs-reader-font-size, 26px) !important;
		line-height: 1.75 !important;
	}

	.gbs-docx-cache-content.is-vertical.is-mongolian *,
	.gbs-docx-cache-content.is-vertical.is-mongolian *::before,
	.gbs-docx-cache-content.is-vertical.is-mongolian *::after {
		-webkit-writing-mode: inherit !important;
		writing-mode: inherit !important;
		-webkit-text-orientation: inherit !important;
		text-orientation: inherit !important;
		font-family: inherit !important;
		font-size: inherit !important;
		font-weight: inherit !important;
		font-style: inherit !important;
		line-height: inherit !important;
		letter-spacing: inherit !important;
		vertical-align: baseline !important;
		transform: none !important;
		translate: none !important;
		rotate: none !important;
		scale: none !important;
		text-combine-upright: none !important;
	}
}

@media (max-width: 390px) {
	.gbs-hero-symbol { display: none; }
	.gbs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.gbs-button-icon { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.gbs-bookshelf *, .gbs-bookshelf *::before, .gbs-bookshelf *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


/* Isolate Gaiha Bookshelf reader from Gaiha Radio / Media overlays.
 * Radio's video reader uses a very high fixed z-index, so the bookshelf reader
 * must sit above it and temporarily suppress radio/media UI while open. */
html.gbs-reader-open,
body.gbs-reader-open {
	overflow: hidden !important;
}

body.gbs-reader-open .gaiha-media-library,
body.gbs-reader-open .gaiha-radio-sticky,
body.gbs-reader-open .gaiha-media-reader,
body.gbs-reader-open > .gaiha-media-reader,
body.gbs-reader-open .gaiha-radio-component,
body.gbs-reader-open .gaiha-radio-page__player {
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

body.gbs-reader-open .gbs-reader,
body.gbs-reader-open .gbs-reader * {
	visibility: visible;
}

body.gbs-reader-open .gbs-reader {
	opacity: 1 !important;
	z-index: 2147483646 !important;
}

@media (max-width: 760px) {
	.gbs-library-title-image-wrap { padding: 8px 10px; border-radius: 22px; }
	.gbs-library-title-image { width: min(100%, var(--gbs-title-image-width, 220px)); }
}

/* Word-match reader font enforcement. */
.gbs-reader-body .gbs-docx-view,
.gbs-reader-body .gbs-docx-view *,
.gbs-reader-body .gbs-docx-cache-content,
.gbs-reader-body .gbs-docx-cache-content * {
	font-family: var(--gbs-reader-font, ui-serif, Georgia, "Times New Roman", serif) !important;
	font-synthesis: none !important;
}

.gbs-reader-body .gbs-docx-view,
.gbs-reader-body .gbs-docx-cache-content {
	font-size: var(--gbs-reader-font-size, 26px) !important;
}

.gbs-docx-cache-content.is-vertical.is-mongolian {
	font-variant-ligatures: common-ligatures contextual !important;
	font-feature-settings: "ccmp" 1, "locl" 1, "rlig" 1, "calt" 1, "liga" 1 !important;
	-webkit-font-feature-settings: "ccmp" 1, "locl" 1, "rlig" 1, "calt" 1, "liga" 1 !important;
}

/* Reader performance tuning: reduce GPU cost without changing layout. */
.gbs-reader-panel {
    contain: layout paint;
}
.gbs-reader-body,
.gbs-docx-cache-content,
.gbs-reader-frame {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
.gbs-reader-backdrop {
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    backdrop-filter: blur(12px) saturate(120%);
}
.gbs-reader-panel {
    -webkit-backdrop-filter: blur(16px) saturate(125%);
    backdrop-filter: blur(16px) saturate(125%);
}
@media (max-width:760px) {
    .gbs-reader-backdrop {
        -webkit-backdrop-filter: blur(6px) saturate(110%);
        backdrop-filter: blur(6px) saturate(110%);
    }
    .gbs-reader-panel {
        -webkit-backdrop-filter: blur(10px) saturate(115%);
        backdrop-filter: blur(10px) saturate(115%);
    }
}


/* v2.0.7.2: stable, lightweight fullscreen layout.
 * Keep vertical DOCX line length close to the normal reader so fullscreen does
 * not collapse the book into a few very tall columns or trigger a huge reflow. */
.gbs-reader-fullscreen-fallback .gbs-reader-panel,
.gbs-reader-panel:fullscreen,
.gbs-reader-panel:-webkit-full-screen {
	position: fixed !important;
	inset: 0 !important;
	display: grid !important;
	grid-template-rows: 1fr !important;
	width: 100% !important;
	height: 100% !important;
	min-width: 100% !important;
	min-height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	animation: none !important;
	contain: none !important;
	-webkit-backdrop-filter: none !important;
	backdrop-filter: none !important;
	background: var(--gbs-reader-bg-start,#efe5b8) !important;
}

.gbs-reader-fullscreen-fallback .gbs-reader-bar,
.gbs-reader-panel:fullscreen .gbs-reader-bar,
.gbs-reader-panel:-webkit-full-screen .gbs-reader-bar {
	position: absolute !important;
	top: 8px !important;
	right: 8px !important;
	left: auto !important;
	z-index: 60 !important;
	display: flex !important;
	width: auto !important;
	min-height: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	-webkit-backdrop-filter: none !important;
	backdrop-filter: none !important;
	pointer-events: none;
}

.gbs-reader-fullscreen-fallback .gbs-reader-actions,
.gbs-reader-panel:fullscreen .gbs-reader-actions,
.gbs-reader-panel:-webkit-full-screen .gbs-reader-actions {
	pointer-events: auto;
	padding: 4px !important;
	border-radius: 13px !important;
	background: rgba(239,246,252,.82) !important;
	box-shadow: 0 5px 18px rgba(54,72,96,.10) !important;
	-webkit-backdrop-filter: none !important;
	backdrop-filter: none !important;
}

.gbs-reader-fullscreen-fallback .gbs-reader-body,
.gbs-reader-panel:fullscreen .gbs-reader-body,
.gbs-reader-panel:-webkit-full-screen .gbs-reader-body {
	grid-row: 1 !important;
	width: 100% !important;
	height: 100% !important;
	min-height: 0 !important;
	box-shadow: none !important;
	text-rendering: auto !important;
}

.gbs-reader-fullscreen-fallback .gbs-reader-turn,
.gbs-reader-panel:fullscreen .gbs-reader-turn,
.gbs-reader-panel:-webkit-full-screen .gbs-reader-turn {
	-webkit-backdrop-filter: none !important;
	backdrop-filter: none !important;
	box-shadow: 0 4px 14px rgba(62,82,105,.10) !important;
}

/* Desktop fullscreen: cap the inline length of vertical Mongolian text.
 * This keeps approximately the same number of columns as the normal reader
 * and avoids an expensive full-book reflow on entry/exit. */
@media (min-width: 761px) {
	.gbs-reader-fullscreen-fallback .gbs-docx-cache-content.is-vertical,
	.gbs-reader-panel:fullscreen .gbs-docx-cache-content.is-vertical,
	.gbs-reader-panel:-webkit-full-screen .gbs-docx-cache-content.is-vertical {
		top: max(18px, calc((100% - 860px) / 2)) !important;
		height: min(860px, calc(100% - 36px)) !important;
	}
}

/* Mobile fullscreen keeps the mobile line length and uses the full usable height. */
@media (max-width: 760px) {
	.gbs-reader-fullscreen-fallback .gbs-reader-bar,
	.gbs-reader-panel:fullscreen .gbs-reader-bar,
	.gbs-reader-panel:-webkit-full-screen .gbs-reader-bar {
		top: 5px !important;
		right: 5px !important;
	}
	.gbs-reader-fullscreen-fallback .gbs-docx-cache-content.is-vertical,
	.gbs-reader-panel:fullscreen .gbs-docx-cache-content.is-vertical,
	.gbs-reader-panel:-webkit-full-screen .gbs-docx-cache-content.is-vertical {
		top: 14px !important;
		height: calc(100% - 28px) !important;
	}
}

/* =========================================================
 * Gaiha Bookshelf v2.1.0 — Frost Style
 * Visual layer only. Reader behavior, Mongolian flow, DOCX,
 * EPUB/PDF, membership and Gaiha Ads integration stay intact.
 * ========================================================= */
.gbs-bookshelf {
	--gbs-frost-bg: #f7f7f5;
	--gbs-frost-surface: #ffffff;
	--gbs-frost-surface-soft: #fbfbf9;
	--gbs-frost-text: #171717;
	--gbs-frost-muted: #6f6f6b;
	--gbs-frost-line: #deded9;
	--gbs-frost-line-strong: #cfcfca;
	--gbs-frost-shadow: 0 10px 30px rgba(20, 20, 18, .055);
	--gbs-text: var(--gbs-frost-text);
	--gbs-muted: var(--gbs-frost-muted);
	min-height: 620px;
	margin-top: calc(var(--gbs-fixed-header-offset) + 22px);
	margin-bottom: 42px;
	padding: clamp(24px, 4vw, 64px);
	overflow: hidden;
	border: 0;
	border-radius: 0;
	background:
		linear-gradient(rgba(247,247,245,.94), rgba(247,247,245,.94)),
		var(--gbs-background-image, none) center / cover no-repeat;
}

.gbs-bookshelf.gbs-fullwidth {
	width: 100%;
	max-width: none !important;
	margin-left: 0;
}

.gbs-ambient { display: none !important; }

.gbs-shell {
	max-width: 1320px;
	margin: 0 auto;
}

.gbs-glass,
.gbs-book-glass {
	border: 1px solid var(--gbs-frost-line);
	background: var(--gbs-frost-surface);
	box-shadow: none;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

.gbs-hero {
	min-height: 164px;
	padding: clamp(38px, 6vw, 76px) 0;
	border: 0;
	border-bottom: 1px solid var(--gbs-frost-line);
	border-radius: 0;
	background:
		linear-gradient(rgba(247,247,245,.86), rgba(247,247,245,.86)),
		var(--gbs-hero-background-image, none) center / cover no-repeat;
	box-shadow: none;
}

.gbs-hero-vertical { min-height: 280px; }

.gbs-hero-copy {
	max-width: 920px;
	margin: 0 auto;
}

.gbs-eyebrow {
	margin-bottom: 14px !important;
	color: var(--gbs-frost-muted);
	font-size: 11px !important;
	font-weight: 650;
	letter-spacing: .12em;
}

.gbs-library-title {
	color: var(--gbs-frost-text);
	font-weight: 680;
	letter-spacing: -.035em;
}

.gbs-library-title-image-wrap {
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent !important;
	box-shadow: none !important;
	-webkit-backdrop-filter: none !important;
	backdrop-filter: none !important;
	animation: none !important;
}

.gbs-library-title-image {
	filter: none;
}

.gbs-title-image-effect-glow,
.gbs-title-image-effect-float,
.gbs-title-image-effect-pulse,
.gbs-title-image-effect-glass {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	-webkit-backdrop-filter: none !important;
	backdrop-filter: none !important;
	animation: none !important;
}

.gbs-count {
	margin-top: 18px !important;
	color: var(--gbs-frost-muted);
	font-size: 13px !important;
}

.gbs-hero-symbol {
	top: 44px;
	right: 0;
	width: 58px;
	height: 58px;
	border: 1px solid var(--gbs-frost-line);
	border-radius: 8px;
	background: var(--gbs-frost-surface);
	box-shadow: none;
}

.gbs-hero-symbol svg {
	width: 30px;
	height: 30px;
	stroke-width: 2;
}

.gbs-toolbar {
	grid-template-columns: minmax(260px, 1fr) auto auto;
	gap: 10px;
	margin: 28px 0 36px;
	padding: 0 0 18px;
	border: 0;
	border-bottom: 1px solid var(--gbs-frost-line);
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.gbs-select-wrap {
	height: 44px;
	border: 1px solid var(--gbs-frost-line-strong);
	border-radius: 6px;
	background: var(--gbs-frost-surface);
	transition: border-color .16s ease, box-shadow .16s ease;
}

.gbs-select-wrap:focus-within {
	border-color: #8d8d87;
	box-shadow: 0 0 0 2px rgba(30,30,28,.06);
}


.gbs-select-wrap select {
	color: var(--gbs-frost-text);
	font-size: 13px !important;
}


.gbs-grid {
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 34px 24px;
}

.gbs-book {
	transition: none;
}

.gbs-book-glass {
	padding: 0;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: var(--gbs-frost-shadow);
	transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.gbs-book:hover .gbs-book-glass,
.gbs-book:focus-within .gbs-book-glass {
	transform: translateY(-2px);
	border-color: var(--gbs-frost-line-strong);
	box-shadow: 0 14px 34px rgba(20,20,18,.075);
}

.gbs-cover-wrap {
	border-radius: 0;
	background: #ecece8;
	box-shadow: none;
}

.gbs-cover {
	transition: opacity .18s ease;
}

.gbs-book:hover .gbs-cover { transform: none; opacity: .97; }

.gbs-cover-placeholder {
	background: #f0f0ed;
}

.gbs-cover-placeholder::before {
	inset: 18px;
	border-color: #cfcfca;
	border-radius: 0;
}

.gbs-access-badge {
	top: 9px;
	right: 9px;
	padding: 5px 7px;
	border: 0;
	border-radius: 4px;
	font-size: 9px;
	letter-spacing: .04em;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

.gbs-book-info {
	padding: 18px 18px 16px;
}

.gbs-book-info h3 {
	color: var(--gbs-frost-text);
	font-size: 15px !important;
	font-weight: 660;
	line-height: 1.45 !important;
	letter-spacing: -.01em;
}

.gbs-content-type,
.gbs-vertical-format {
	color: var(--gbs-frost-muted);
	font-size: 10px !important;
	font-weight: 700;
	letter-spacing: .08em;
}

.gbs-author,
.gbs-meta,
.gbs-vertical-detail {
	color: var(--gbs-frost-muted);
}

.gbs-actions {
	gap: 7px;
	margin-top: 16px;
}

.gbs-button {
	min-height: 38px;
	padding: 0 13px;
	border: 1px solid var(--gbs-frost-line-strong) !important;
	border-radius: 5px;
	transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.gbs-button:hover {
	transform: none;
	opacity: 1;
}

.gbs-button-primary {
	color: #fff !important;
	border-color: color-mix(in srgb, var(--gbs-accent) 84%, #111) !important;
	background: var(--gbs-accent) !important;
	box-shadow: none;
	font-size: 12px;
	font-weight: 650;
}

.gbs-button-primary:hover {
	filter: brightness(.94);
}

.gbs-button-icon {
	color: var(--gbs-frost-text) !important;
	background: var(--gbs-frost-surface) !important;
}

.gbs-button-icon:hover {
	background: #f1f1ee !important;
}

.gbs-actions-mongolian .gbs-button-primary {
	border-radius: 5px;
}

.gbs-shelf-edge { display: none !important; }

.gbs-empty,
.gbs-registered-gate {
	border: 1px solid var(--gbs-frost-line);
	border-radius: 8px;
	background: var(--gbs-frost-surface);
	box-shadow: none;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

.gbs-registered-gate-button {
	border-radius: 5px;
	box-shadow: none;
}

/* Frost-style reader shell. */
.gbs-reader {
	padding: 22px;
	color: var(--gbs-frost-text, #171717);
}

.gbs-reader-backdrop {
	background: rgba(241,241,237,.94);
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

.gbs-reader-panel {
	width: min(1200px, 96vw);
	height: min(880px, 94vh);
	border: 1px solid #d8d8d3;
	border-radius: 14px;
	background: #ffffff;
	box-shadow: 0 18px 52px rgba(25,25,22,.09);
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

.gbs-reader-bar {
	min-height: 46px;
	padding: 6px 10px;
	border-bottom: 1px solid #e1e1dc;
	background: #fafaf8;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

.gbs-reader-actions { gap: 6px; }

.gbs-reader-icon {
	width: 32px;
	height: 32px;
	border: 1px solid #d7d7d2 !important;
	border-radius: 6px;
	color: #50504c;
	background: #ffffff !important;
	box-shadow: none;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

.gbs-reader-icon:hover,
.gbs-reader-icon:focus-visible {
	color: #171717;
	border-color: #bdbdb7 !important;
	background: #f1f1ee !important;
	transform: none;
}

.gbs-reader-body,
.gbs-reader-frame,
.gbs-docx-cache-viewport {
	background: var(--gbs-reader-bg-start,#fafaf7) !important;
}

.gbs-reader-turn {
	width: 40px;
	height: 40px;
	border: 1px solid #d5d5d0 !important;
	border-radius: 50%;
	color: #555550;
	background: rgba(255,255,255,.92) !important;
	box-shadow: 0 4px 16px rgba(20,20,18,.06);
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

.gbs-reader-turn:hover {
	background: #f1f1ee !important;
}

/* Keep the fullscreen controls minimal; fullscreen geometry still comes from
 * the stable v2.0.7.2 reader rules above. */
.gbs-reader-fullscreen-fallback .gbs-reader-actions,
.gbs-reader-panel:fullscreen .gbs-reader-actions,
.gbs-reader-panel:-webkit-full-screen .gbs-reader-actions {
	border: 1px solid #d8d8d3 !important;
	border-radius: 7px !important;
	background: rgba(255,255,255,.94) !important;
	box-shadow: 0 6px 18px rgba(25,25,22,.07) !important;
}

@media (max-width: 760px) {
	.gbs-bookshelf {
		min-height: 520px;
		margin-top: calc(var(--gbs-fixed-header-offset) + 12px);
		margin-bottom: 24px;
		padding: 22px 14px 30px;
		border-radius: 0;
	}

	.gbs-bookshelf.gbs-fullwidth {
		width: 100%;
		margin-left: 0;
	}

	.gbs-hero {
		min-height: 118px;
		padding: 30px 0 34px;
		border-radius: 0;
	}

	.gbs-hero-vertical { min-height: 230px; }
	.gbs-hero-symbol { top: 24px; right: 0; width: 46px; height: 46px; border-radius: 6px; }
	.gbs-hero-symbol svg { width: 24px; height: 24px; }

	.gbs-toolbar {
		grid-template-columns: 1fr 1fr;
		gap: 8px;
		margin: 18px 0 24px;
		padding-bottom: 14px;
		border-radius: 0;
	}

	.gbs-search { grid-column: 1 / -1; }
	.gbs-search,
	.gbs-select-wrap { height: 42px; border-radius: 5px; }

	.gbs-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 18px 10px;
	}

	.gbs-book-glass { border-radius: 6px; }
	.gbs-cover-wrap { border-radius: 0; }
	.gbs-book-info { padding: 13px 11px 12px; }
	.gbs-actions { gap: 5px; margin-top: 12px; }
	.gbs-button { border-radius: 4px; }

	.gbs-reader {
		padding: 6px;
	}

	.gbs-reader-panel {
		border-radius: 10px;
	}

	.gbs-reader-bar {
		min-height: 40px;
		padding: 5px 6px;
	}

	.gbs-reader-icon {
		width: 30px;
		height: 30px;
		border-radius: 5px;
	}
}

/* =========================================================
 * Gaiha Bookshelf v2.1.1 — Frost visual corrections
 * 1) Pure white bookshelf background.
 * 2) Mobile hero/header image reaches both screen edges.
 * 3) Featured image/card top corners stay square.
 * ========================================================= */
.gbs-bookshelf {
	--gbs-frost-bg: #ffffff;
	background: #ffffff !important;
}

.gbs-hero {
	background:
		linear-gradient(rgba(255,255,255,.84), rgba(255,255,255,.84)),
		var(--gbs-hero-background-image, none) center / cover no-repeat !important;
}

/* A square parent is required; otherwise overflow:hidden on the card clips
 * the top corners of the featured image even when the image itself is square. */
.gbs-book-glass,
.gbs-cover-wrap,
.gbs-cover {
	border-radius: 0 !important;
}

@media (max-width: 760px) {
	/* The bookshelf itself keeps 14px padding for toolbar/cards, while the hero
	 * deliberately bleeds through that padding so the header image has no
	 * artificial left/right safe area. */
	.gbs-hero {
		width: calc(100% + 28px);
		margin-left: -14px;
		margin-right: -14px;
	}
}


/* =========================================================
 * Gaiha Bookshelf v2.1.2 — Frost UX refinement
 * - Header/hero sits directly against the site header.
 * - No decorative separator lines or visible item counter.
 * - Surface hierarchy uses soft shadows rather than borders.
 * - Larger, clearer touch targets and focus/press feedback.
 * ========================================================= */
.gbs-bookshelf {
	margin-top: var(--gbs-fixed-header-offset, 0px) !important;
	padding-top: 0 !important;
	background: #fff !important;
}

.gbs-hero {
	border: 0 !important;
	box-shadow: 0 10px 30px rgba(20, 20, 18, .055) !important;
}

.gbs-count,
.gbs-hero-symbol {
	display: none !important;
}

.gbs-toolbar {
	border: 0 !important;
	padding-bottom: 0 !important;
	box-shadow: none !important;
}

.gbs-select-wrap {
	border: 0 !important;
	background: #fff !important;
	box-shadow: 0 4px 16px rgba(20,20,18,.075) !important;
	transition: box-shadow .16s ease, transform .16s ease, background-color .16s ease !important;
}

.gbs-select-wrap:focus-within {
	border: 0 !important;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--gbs-accent) 16%, transparent), 0 8px 24px rgba(20,20,18,.09) !important;
	transform: translateY(-1px);
}

.gbs-book-glass {
	border: 0 !important;
	box-shadow: 0 8px 26px rgba(20,20,18,.08) !important;
}

.gbs-book:hover .gbs-book-glass,
.gbs-book:focus-within .gbs-book-glass {
	border: 0 !important;
	transform: translateY(-3px);
	box-shadow: 0 16px 40px rgba(20,20,18,.12) !important;
}

.gbs-button {
	min-height: 42px;
	border: 0 !important;
	border-radius: 7px;
	box-shadow: 0 4px 12px rgba(20,20,18,.08) !important;
	transition: transform .14s ease, box-shadow .14s ease, background-color .14s ease, filter .14s ease !important;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.gbs-button:hover {
	transform: translateY(-1px);
	box-shadow: 0 7px 18px rgba(20,20,18,.11) !important;
}

.gbs-button:active {
	transform: translateY(0) scale(.985);
	box-shadow: 0 2px 8px rgba(20,20,18,.08) !important;
}

.gbs-button:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--gbs-accent) 26%, transparent);
	outline-offset: 2px;
}

.gbs-button-primary {
	border: 0 !important;
	box-shadow: 0 6px 16px color-mix(in srgb, var(--gbs-accent) 22%, transparent) !important;
}

.gbs-button-primary:hover {
	filter: brightness(.97);
	box-shadow: 0 9px 22px color-mix(in srgb, var(--gbs-accent) 28%, transparent) !important;
}

.gbs-button-icon {
	background: #fff !important;
}

.gbs-empty,
.gbs-registered-gate {
	border: 0 !important;
	box-shadow: 0 8px 28px rgba(20,20,18,.075) !important;
}

@media (max-width: 760px) {
	.gbs-bookshelf {
		margin-top: var(--gbs-fixed-header-offset, 0px) !important;
		padding: 0 14px 30px !important;
	}

	.gbs-hero {
		margin-top: 0 !important;
		padding-top: 26px;
		box-shadow: 0 8px 24px rgba(20,20,18,.06) !important;
	}

	.gbs-toolbar {
		margin-top: 20px;
		margin-bottom: 26px;
		padding-bottom: 0 !important;
	}

	.gbs-search,
	.gbs-select-wrap {
		height: 46px;
		border-radius: 7px;
	}

	.gbs-button,
	.gbs-button-primary,
	.gbs-button-icon {
		min-height: 44px;
	}

	.gbs-button-icon {
		width: 44px;
	}
}


/* =========================================================
 * Gaiha Bookshelf v2.1.3 — footer spacing + access UX
 * ========================================================= */
body.gbs-bookshelf-page #content,
body.gbs-bookshelf-page .site-content,
body.gbs-bookshelf-page #primary,
body.gbs-bookshelf-page .content-area,
body.gbs-bookshelf-page main,
body.gbs-bookshelf-page .site-main,
body.gbs-bookshelf-page article.page,
body.gbs-bookshelf-page .entry-content,
body.gbs-bookshelf-page .wp-block-post-content {
	min-height: 0 !important;
	margin-bottom: 0 !important;
	padding-bottom: 0 !important;
}
.gbs-bookshelf {
	min-height: 0 !important;
	margin-bottom: 0 !important;
	padding-bottom: 8px !important;
}
.gbs-shell, .gbs-grid { margin-bottom: 0 !important; padding-bottom: 0 !important; }
.gbs-empty[hidden] { display: none !important; }
.gbs-member-gate {
	margin: 24px auto;
	max-width: 760px;
	padding: 28px;
	border: 0 !important;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 10px 34px rgba(20,20,18,.08);
	text-align: center;
}
.gbs-member-gate h3 { margin: 0 0 8px; font-size: 20px; }
.gbs-member-gate p { margin: 0 0 18px; color: #73736e; }
.gbs-member-gate-button {
	display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
	padding: 0 18px; border-radius: 7px; color: #fff !important; background: var(--gbs-accent,#0a84ff);
	box-shadow: 0 6px 16px color-mix(in srgb, var(--gbs-accent,#0a84ff) 22%, transparent); text-decoration: none !important;
}
.gbs-button-disabled { opacity: .58; cursor: not-allowed !important; box-shadow: none !important; }
.gbs-download-login { color: #5c5c57 !important; background: #f6f6f3 !important; }
.gbs-download-login:hover { background: #ecece8 !important; }
@media (max-width:760px) {
	.gbs-bookshelf { min-height: 0 !important; margin-bottom: 0 !important; padding-bottom: 8px !important; }
}


/* v2.1.4: covers are display-only; do not hand them to theme/lightbox viewers. */
.gbs-cover-wrap {
	cursor: default !important;
	-webkit-user-select: none;
	user-select: none;
}
.gbs-cover {
	pointer-events: none !important;
	-webkit-user-drag: none;
	-webkit-touch-callout: none;
}


/* v2.1.5: access badges must always remain visible above cover images. */
.gbs-cover-wrap > .gbs-access-badge {
	display: inline-block !important;
	visibility: visible !important;
	opacity: 1 !important;
	z-index: 8 !important;
}
.gbs-cover-wrap > .gbs-access-badge.is-free { background: #329253 !important; }
.gbs-cover-wrap > .gbs-access-badge.is-paid { background: #d94444 !important; }


/* v2.1.7 — WordPress article content uses the same Gaiha reader shell. */
.gbs-article-reader-content:not(.is-vertical) {
	position: relative !important;
	top: auto !important;
	left: auto !important;
	width: min(980px, calc(100% - 36px)) !important;
	max-width: 980px !important;
	min-width: 0 !important;
	height: auto !important;
	margin: 18px auto 40px !important;
	padding: 0 18px 40px !important;
	box-sizing: border-box !important;
	writing-mode: horizontal-tb !important;
	text-orientation: mixed !important;
}
.gbs-article-reader-content img,
.gbs-article-reader-content video,
.gbs-article-reader-content iframe {
	max-width: 100% !important;
	height: auto;
}
.gbs-article-reader-content figure { max-width: 100%; margin-inline: 0; }
.gbs-article-reader-content a { color: inherit; }
@media (max-width: 782px) {
	.gbs-article-reader-content:not(.is-vertical) {
		width: calc(100% - 20px) !important;
		margin: 10px auto 28px !important;
		padding: 0 10px 28px !important;
	}
}

/* v2.2.0 Native reader notes ------------------------------------------------ */
.gbs-note-quick{
	position:fixed;z-index:10020;width:40px;height:40px;padding:0;border:1px solid rgba(31,43,52,.10);border-radius:13px;
	background:#fff;color:#24343f;box-shadow:0 10px 28px rgba(28,43,56,.14);display:grid;place-items:center;font-size:20px;line-height:1;cursor:pointer;
}
.gbs-note-quick[hidden]{display:none!important}
.gbs-note-panel{
	position:fixed;z-index:10030;left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));max-height:min(72vh,620px);
	padding:10px;background:rgba(255,255,255,.985);border:1px solid rgba(31,43,52,.10);border-radius:20px;
	box-shadow:0 24px 70px rgba(28,43,56,.18);color:#1f2b34;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Helvetica Neue",Arial,sans-serif;
}
.gbs-note-panel[hidden]{display:none!important}.gbs-note-panel.has-error{outline:2px solid #d74b4b}
.gbs-note-grip{width:40px;height:4px;border-radius:999px;background:#d2d9de;margin:0 auto 8px}
.gbs-note-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.gbs-note-modes{display:flex;gap:7px}
.gbs-note-modes button,.gbs-note-close,.gbs-note-actions button{width:40px;height:36px;border:0;border-radius:10px;background:#f1f4f6;color:#293b47;display:grid;place-items:center;padding:0}
.gbs-note-modes button.is-active{background:#deebff;color:#2058c7}
.gbs-note-selected{margin:9px 0;max-height:80px;overflow:auto;padding:9px 10px;border-radius:11px;background:#f6f7f8;color:#62727d;font-size:12px;line-height:1.5}
.gbs-note-text{width:100%;height:180px;resize:none;outline:0;border:1px solid rgba(31,43,52,.10);border-radius:13px;background:#fbfcfc;color:#1f2b34;padding:12px;font-size:16px;line-height:1.8;box-sizing:border-box}
.gbs-note-text.is-vertical{writing-mode:vertical-lr;text-orientation:mixed}
.gbs-note-draw{height:260px}.gbs-note-draw canvas{width:100%;height:200px;display:block;background:#fff;border:1px solid rgba(31,43,52,.10);border-radius:13px;touch-action:none}
.gbs-note-draw-tools{display:flex;align-items:center;gap:8px;padding-top:8px;overflow-x:auto;scrollbar-width:none}.gbs-note-draw-tools::-webkit-scrollbar{display:none}
.gbs-note-colors,.gbs-note-widths{display:flex;align-items:center;gap:7px}.gbs-note-colors button{width:26px;height:26px;min-width:26px;border-radius:50%;border:2px solid #fff;background:var(--c);box-shadow:0 0 0 1px rgba(31,43,52,.14);padding:0}
.gbs-note-colors button.is-active{box-shadow:0 0 0 2px #fff,0 0 0 4px #263640}.gbs-note-widths button,.gbs-note-draw-tools>[data-note-clear]{width:30px;height:30px;min-width:30px;border:0;border-radius:9px;background:#f1f4f6;display:grid;place-items:center;padding:0}
.gbs-note-widths i{display:block;width:var(--s);height:var(--s);border-radius:50%;background:#263640}.gbs-note-widths button.is-active{background:#dfe6ea}
.gbs-note-actions{display:flex;justify-content:space-between;margin-top:9px}.gbs-note-actions .gbs-note-save{background:#263640;color:#fff}.gbs-note-actions .gbs-note-save:disabled{opacity:.45}
.gbs-reader-note-mark{background:rgba(255,210,68,.42)!important;color:inherit!important;border-radius:4px;padding:0 1px}
@media(min-width:768px){.gbs-note-panel{left:auto;right:22px;width:440px;bottom:22px}}


/* =========================================================
 * v2.2.1 — iPhone/iPad Safari real visible-height fix
 * The reader now follows VisualViewport instead of layout-viewport/100vh.
 * This prevents the bottom browser chrome from covering Mongolian text.
 * ========================================================= */
@media (max-width: 1024px) {
	.gbs-reader {
		top: var(--gbs-vv-top, 0px) !important;
		right: 0 !important;
		bottom: auto !important;
		left: 0 !important;
		width: 100% !important;
		height: var(--gbs-vv-height, 100dvh) !important;
		max-height: var(--gbs-vv-height, 100dvh) !important;
		padding:
			max(4px, env(safe-area-inset-top))
			5px
			max(4px, env(safe-area-inset-bottom)) !important;
		box-sizing: border-box !important;
		place-items: stretch !important;
	}

	.gbs-reader-panel {
		width: 100% !important;
		height: 100% !important;
		min-height: 0 !important;
		max-height: 100% !important;
		border-radius: 10px !important;
		grid-template-rows: auto minmax(0, 1fr) !important;
	}

	.gbs-reader-body {
		min-height: 0 !important;
		height: auto !important;
		overflow: hidden !important;
	}

	.gbs-docx-view,
	.gbs-docx-cache-viewport {
		min-height: 0 !important;
		max-height: 100% !important;
		height: 100% !important;
		overflow: auto !important;
		-webkit-overflow-scrolling: touch !important;
		overscroll-behavior: contain !important;
	}

	.gbs-docx-cache-content.is-vertical {
		top: 8px !important;
		left: 8px !important;
		right: 8px !important;
		bottom: 8px !important;
		width: auto !important;
		height: auto !important;
		max-height: none !important;
		padding-right: 8px !important;
		padding-bottom: max(12px, env(safe-area-inset-bottom)) !important;
		box-sizing: border-box !important;
		overflow-x: auto !important;
		overflow-y: auto !important;
		-webkit-overflow-scrolling: touch !important;
	}

	.gbs-reader-frame {
		width: 100% !important;
		height: 100% !important;
		min-height: 0 !important;
	}

	/* Selection/note UI must remain inside the actually visible phone viewport. */
	.gbs-note-quick {
		max-width: calc(100vw - 12px);
		max-height: calc(var(--gbs-vv-height, 100dvh) - 12px);
	}

	.gbs-note-panel {
		left: 8px !important;
		right: 8px !important;
		bottom: max(8px, env(safe-area-inset-bottom)) !important;
		max-height: calc(var(--gbs-vv-height, 100dvh) - 24px) !important;
		overflow: auto !important;
		-webkit-overflow-scrolling: touch !important;
	}
}

/* iPhone landscape is extremely short once Safari chrome is visible. */
@media (max-width: 1024px) and (orientation: landscape) {
	.gbs-reader-bar {
		min-height: 36px !important;
		padding: 3px 5px !important;
	}
	.gbs-reader-icon {
		width: 28px !important;
		height: 28px !important;
	}
	.gbs-note-text {
		height: min(132px, 34vh) !important;
	}
	.gbs-note-draw {
		height: min(190px, 48vh) !important;
	}
	.gbs-note-draw canvas {
		height: min(140px, 34vh) !important;
	}
}


/* =========================================================
 * v2.2.2 — Native reader notes visibility/function fix
 * Note UI lives inside .gbs-reader, above .gbs-reader-panel.
 * Previous builds placed it behind the reader's z-index 2147483646,
 * so the feature existed in code but was literally invisible.
 * ========================================================= */
.gbs-reader > .gbs-note-quick,
.gbs-reader > .gbs-note-panel {
	pointer-events: auto !important;
	visibility: visible;
}
.gbs-reader > .gbs-note-quick { z-index: 10020 !important; }
.gbs-reader > .gbs-note-panel { z-index: 10030 !important; }

@media (max-width: 1024px) {
	.gbs-reader > .gbs-note-quick {
		position: fixed !important;
	}
	.gbs-reader > .gbs-note-panel {
		position: fixed !important;
		max-height: calc(var(--gbs-vv-height, 100dvh) - 20px) !important;
	}
}


/* =========================================================
 * v2.2.3 — Reader notes hard-visible / hard-bound fix
 * The toolbar pen is intentionally always present. This makes it obvious
 * whether the native note feature has loaded, while save remains login-only.
 * ========================================================= */
.gbs-reader-note-tool span {
	font-size: 17px;
	line-height: 1;
	font-weight: 700;
}
.gbs-reader-note-tool.is-guest {
	opacity: .52;
}
.gbs-note-toast {
	position: fixed;
	z-index: 10040;
	left: 50%;
	bottom: max(82px, calc(16px + env(safe-area-inset-bottom)));
	transform: translateX(-50%);
	max-width: calc(100vw - 28px);
	padding: 9px 13px;
	border: 1px solid rgba(31,43,52,.10);
	border-radius: 11px;
	background: rgba(31,43,52,.94);
	color: #fff;
	font-size: 13px;
	line-height: 1.35;
	white-space: nowrap;
	box-shadow: 0 12px 30px rgba(20,30,38,.18);
	pointer-events: none;
}
.gbs-note-toast[hidden] { display:none!important; }

/* Allow native iOS text selection explicitly inside text-based reader content. */
.gbs-docx-cache-content,
.gbs-docx-cache-content *,
.gbs-article-reader-content,
.gbs-article-reader-content * {
	-webkit-user-select: text !important;
	user-select: text !important;
	-webkit-touch-callout: default !important;
}

/* Do not let decorative/reader controls interfere with selection. */
.gbs-reader-bar,
.gbs-reader-turn,
.gbs-gaiha-ads-host {
	-webkit-user-select: none;
	user-select: none;
}


/* =========================================================
 * v2.2.4 — Note save always visible + real vertical Mongolian label
 * ========================================================= */
.gbs-note-head{
	display:flex !important;
	align-items:center !important;
	justify-content:space-between !important;
	gap:8px !important;
	position:sticky !important;
	top:0 !important;
	z-index:3 !important;
	padding-bottom:4px !important;
	background:rgba(255,255,255,.985) !important;
}
.gbs-note-head-actions{
	display:flex !important;
	align-items:center !important;
	gap:7px !important;
	margin-left:auto !important;
}
.gbs-note-save-top{
	width:auto !important;
	min-width:54px !important;
	height:36px !important;
	padding:0 12px !important;
	border:0 !important;
	border-radius:10px !important;
	background:#263640 !important;
	color:#fff !important;
	font-size:13px !important;
	font-weight:700 !important;
	display:flex !important;
	align-items:center !important;
	justify-content:center !important;
}
.gbs-note-save-top:disabled{opacity:.45 !important}

/* Use actual traditional Mongolian text rather than a decorative squiggle. */
.gbs-note-mode-mongol{
	width:40px !important;
	height:40px !important;
	padding:2px !important;
	overflow:hidden !important;
}
.gbs-note-mode-mongol > span{
	display:block !important;
	writing-mode:vertical-lr !important;
	text-orientation:mixed !important;
	white-space:nowrap !important;
	font-family:var(--gbs-reader-font, "GLTBooxanTig", serif) !important;
	font-size:10px !important;
	line-height:1 !important;
	letter-spacing:0 !important;
}

/* The vertical note editor is forcibly vertical. */
.gbs-note-text.is-vertical{
	writing-mode:vertical-lr !important;
	text-orientation:mixed !important;
	direction:ltr !important;
	white-space:pre-wrap !important;
	overflow:auto !important;
	-webkit-overflow-scrolling:touch !important;
}

/* Old bottom save/cancel row is removed; save now lives in the header. */
.gbs-note-actions{display:none !important}

@media(max-width:1024px){
	.gbs-note-panel{
		display:flex !important;
		flex-direction:column !important;
	}
	.gbs-note-selected{flex:0 0 auto !important}
	.gbs-note-text,
	.gbs-note-draw{
		flex:1 1 auto !important;
		min-height:120px !important;
	}
}

@media(prefers-color-scheme:dark){
	.gbs-note-head{background:rgba(27,33,38,.985) !important}
}


/* =========================================================
 * v2.2.5 — Selected Mongolian preview vertical + icon-only save
 * ========================================================= */
.gbs-note-selected.is-vertical{
	writing-mode:vertical-lr !important;
	text-orientation:mixed !important;
	white-space:pre-wrap !important;
	height:74px !important;
	max-height:74px !important;
	width:100% !important;
	overflow-x:auto !important;
	overflow-y:hidden !important;
	padding:8px 10px !important;
	line-height:1.55 !important;
}
.gbs-note-selected.is-horizontal{
	writing-mode:horizontal-tb !important;
	text-orientation:mixed !important;
	height:auto !important;
	max-height:80px !important;
	overflow:auto !important;
}

.gbs-note-save-top{
	width:36px !important;
	min-width:36px !important;
	height:36px !important;
	padding:0 !important;
	border-radius:10px !important;
	display:grid !important;
	place-items:center !important;
}
.gbs-note-save-top svg{
	width:18px !important;
	height:18px !important;
	display:block !important;
	fill:none !important;
	stroke:currentColor !important;
	stroke-width:1.8 !important;
	stroke-linecap:round !important;
	stroke-linejoin:round !important;
}
.gbs-note-save-top svg path:first-child{
	fill:none !important;
}


/* =========================================================
 * v2.2.6 — Selected source quotation is always vertical Mongolian.
 * The user's note mode can still be horizontal, but the quoted original
 * Mongolian text never changes to horizontal.
 * ========================================================= */
.gbs-note-selected{
	writing-mode:vertical-lr !important;
	text-orientation:mixed !important;
	white-space:pre-wrap !important;
	font-family:var(--gbs-reader-font, "GLTBooxanTig", serif) !important;
	height:74px !important;
	max-height:74px !important;
	overflow-x:auto !important;
	overflow-y:hidden !important;
}
.gbs-note-selected.is-horizontal{
	writing-mode:vertical-lr !important;
	text-orientation:mixed !important;
	height:74px !important;
	max-height:74px !important;
	overflow-x:auto !important;
	overflow-y:hidden !important;
}


/* =========================================================
 * v2.2.7 — Selected Mongolian source text moves to the LEFT
 * as a permanent vertical quotation rail beside the note workspace.
 * ========================================================= */
.gbs-note-workspace{
	display:grid !important;
	grid-template-columns:72px minmax(0,1fr) !important;
	gap:10px !important;
	align-items:stretch !important;
	min-height:180px !important;
	flex:1 1 auto !important;
	min-width:0 !important;
}

.gbs-note-editor-pane{
	min-width:0 !important;
	min-height:0 !important;
	display:flex !important;
	flex-direction:column !important;
}

.gbs-note-workspace > .gbs-note-selected{
	grid-column:1 !important;
	grid-row:1 !important;
	margin:0 !important;
	width:72px !important;
	min-width:72px !important;
	height:auto !important;
	max-height:none !important;
	min-height:180px !important;
	padding:10px 8px !important;
	border-radius:12px !important;
	background:#f5f6f7 !important;
	color:#61717d !important;
	box-sizing:border-box !important;
	writing-mode:vertical-lr !important;
	text-orientation:mixed !important;
	white-space:pre-wrap !important;
	overflow-x:auto !important;
	overflow-y:hidden !important;
	-webkit-overflow-scrolling:touch !important;
	font-family:var(--gbs-reader-font, "GLTBooxanTig", serif) !important;
	font-size:13px !important;
	line-height:1.55 !important;
}

.gbs-note-editor-pane > .gbs-note-text{
	width:100% !important;
	flex:1 1 auto !important;
	min-height:180px !important;
	height:auto !important;
	margin:0 !important;
}

.gbs-note-editor-pane > .gbs-note-draw{
	width:100% !important;
	flex:1 1 auto !important;
	min-height:220px !important;
	margin:0 !important;
}

/* Horizontal note mode changes only the note editor;
   the quoted Mongolian source on the left always stays vertical. */
.gbs-note-workspace > .gbs-note-selected.is-horizontal,
.gbs-note-workspace > .gbs-note-selected.is-vertical{
	writing-mode:vertical-lr !important;
	text-orientation:mixed !important;
	width:72px !important;
	height:auto !important;
	max-height:none !important;
	overflow-x:auto !important;
	overflow-y:hidden !important;
}

/* On very narrow phones keep the left quotation rail compact,
   but never move it above the editor. */
@media(max-width:520px){
	.gbs-note-workspace{
		grid-template-columns:58px minmax(0,1fr) !important;
		gap:8px !important;
	}
	.gbs-note-workspace > .gbs-note-selected,
	.gbs-note-workspace > .gbs-note-selected.is-horizontal,
	.gbs-note-workspace > .gbs-note-selected.is-vertical{
		width:58px !important;
		min-width:58px !important;
		padding:8px 6px !important;
		font-size:11px !important;
	}
}

/* Landscape phone: prioritize editor width while preserving the quote rail. */
@media(max-width:1024px) and (orientation:landscape){
	.gbs-note-workspace{
		grid-template-columns:62px minmax(0,1fr) !important;
	}
	.gbs-note-workspace > .gbs-note-selected{
		width:62px !important;
		min-width:62px !important;
	}
}

@media(prefers-color-scheme:dark){
	.gbs-note-workspace > .gbs-note-selected{
		background:#252d33 !important;
		color:#aeb9c0 !important;
	}
}


/* =========================================================
 * v2.3.0 — Multiple notes per book + 本书笔记
 * ========================================================= */
.gbs-reader-note-list-tool{position:relative}
.gbs-reader-note-list-tool svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.gbs-note-count{position:absolute;right:-4px;top:-5px;min-width:16px;height:16px;padding:0 4px;border-radius:999px;background:#263640;color:#fff;font-size:9px;line-height:16px;font-weight:700;box-sizing:border-box;text-align:center}
.gbs-note-count[hidden]{display:none!important}
.gbs-reader-note-mark{cursor:pointer!important;text-decoration:none!important;transition:background .18s ease,box-shadow .18s ease}
.gbs-reader-note-mark.is-focus{background:rgba(255,184,0,.72)!important;box-shadow:0 0 0 3px rgba(255,184,0,.18)}

.gbs-note-overview{
	position:fixed;z-index:10025;top:max(10px,env(safe-area-inset-top));right:10px;bottom:max(10px,env(safe-area-inset-bottom));
	width:min(430px,calc(100vw - 20px));padding:12px;box-sizing:border-box;border:1px solid rgba(31,43,52,.10);
	border-radius:20px;background:rgba(255,255,255,.985);box-shadow:0 24px 70px rgba(28,43,56,.18);color:#1f2b34;
	display:flex;flex-direction:column;gap:10px;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Helvetica Neue",Arial,sans-serif
}
.gbs-note-overview[hidden]{display:none!important}
.gbs-note-overview-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex:0 0 auto}
.gbs-note-overview-head strong{font-size:15px}
.gbs-note-overview-actions{display:flex;align-items:center;gap:7px}
.gbs-note-overview-actions button,.gbs-note-item-actions button{
	width:34px;height:34px;border:0;border-radius:9px;background:#f1f4f6;color:#2a3a45;display:grid;place-items:center;padding:0
}
.gbs-note-overview-actions svg,.gbs-note-item-actions svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.gbs-note-filters{display:flex;align-items:center;gap:6px;overflow-x:auto;scrollbar-width:none;flex:0 0 auto}
.gbs-note-filters::-webkit-scrollbar{display:none}
.gbs-note-filters button{border:1px solid rgba(31,43,52,.09);background:#fff;color:#5a6973;border-radius:8px;padding:6px 9px;font-size:12px;white-space:nowrap}
.gbs-note-filters button.is-active{background:#263640;color:#fff;border-color:#263640}
.gbs-note-list{overflow:auto;-webkit-overflow-scrolling:touch;min-height:0;display:flex;flex-direction:column;gap:8px}
.gbs-note-empty{padding:30px 12px;text-align:center;color:#84919a;font-size:13px}
.gbs-note-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;border:1px solid rgba(31,43,52,.08);border-radius:13px;background:#fbfcfc;padding:7px}
.gbs-note-jump{border:0;background:transparent;padding:0;display:grid;grid-template-columns:58px minmax(0,1fr);gap:9px;text-align:left;color:inherit;min-width:0;cursor:pointer}
.gbs-note-item-source{
	display:block;width:58px;min-width:58px;height:84px;max-height:84px;padding:7px 5px;box-sizing:border-box;border-radius:9px;
	background:#f2f4f5;color:#687984;writing-mode:vertical-lr;text-orientation:mixed;overflow-x:auto;overflow-y:hidden;
	font-family:var(--gbs-reader-font,"GLTBooxanTig",serif);font-size:10px;line-height:1.45
}
.gbs-note-item-main{display:flex;flex-direction:column;gap:5px;min-width:0;padding:3px 0}
.gbs-note-item-meta{font-size:10px;color:#87949d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gbs-note-item-content{font-size:13px;line-height:1.55;color:#293943;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.gbs-note-item-actions{display:flex;flex-direction:column;gap:6px}
.gbs-note-item-actions button{width:30px;height:30px}
.gbs-note-item-actions [data-note-delete]{color:#a63f3f}

@media(max-width:620px){
	.gbs-note-overview{top:auto;left:8px;right:8px;bottom:max(8px,env(safe-area-inset-bottom));width:auto;max-height:min(76vh,620px);border-radius:18px}
	.gbs-note-jump{grid-template-columns:50px minmax(0,1fr)}
	.gbs-note-item-source{width:50px;min-width:50px;height:76px;max-height:76px}
}
@media(prefers-color-scheme:dark){
	.gbs-note-overview{background:rgba(27,33,38,.985);color:#eef3f6;border-color:rgba(255,255,255,.08)}
	.gbs-note-filters button{background:#252d33;color:#bac5cb;border-color:rgba(255,255,255,.08)}
	.gbs-note-filters button.is-active{background:#e8eef2;color:#1f2b34}
	.gbs-note-item{background:#222a30;border-color:rgba(255,255,255,.06)}
	.gbs-note-item-source{background:#2b343a;color:#aeb9c0}
	.gbs-note-item-content{color:#eef3f6}
	.gbs-note-overview-actions button,.gbs-note-item-actions button{background:#2b343a;color:#e6edf1}
}


/* =========================================================
 * v2.3.1 — 本书笔记 UX refinement
 * Accepted direction:
 * - panel is NOT glued to the very top
 * - Mongolian title replaces Chinese heading
 * - Mongolian title is laid out horizontally first, then rotated clockwise 90deg
 * - smaller typography / calmer spacing
 * ========================================================= */

.gbs-note-overview{
	top:max(34px, calc(env(safe-area-inset-top) + 22px)) !important;
	right:14px !important;
	bottom:max(14px, calc(env(safe-area-inset-bottom) + 10px)) !important;
	width:min(430px, calc(100vw - 28px)) !important;
	padding:14px !important;
	border-radius:20px !important;
	gap:12px !important;
}

.gbs-note-overview-head{
	min-height:62px !important;
	align-items:flex-start !important;
	position:relative !important;
	padding:4px 0 2px 66px !important;
	box-sizing:border-box !important;
}

/* Mongolian heading:
 * horizontal shaping first -> rotate clockwise 90deg.
 * This follows the user's preferred title treatment.
 */
.gbs-note-overview-title-mongol{
	position:absolute !important;
	left:8px !important;
	top:4px !important;
	width:48px !important;
	height:54px !important;
	margin:0 !important;
	display:flex !important;
	align-items:flex-start !important;
	justify-content:flex-start !important;
	overflow:visible !important;
	font-weight:400 !important;
}

.gbs-note-overview-title-mongol > span{
	display:inline-block !important;
	white-space:nowrap !important;
	writing-mode:horizontal-tb !important;
	text-orientation:mixed !important;
	transform:rotate(90deg) !important;
	transform-origin:top left !important;
	font-family:var(--gbs-reader-font, "GLTBooxanTig", serif) !important;
	font-size:10px !important;
	line-height:1 !important;
	font-weight:400 !important;
	letter-spacing:0 !important;
	color:#31424e !important;
}

.gbs-note-overview-actions{
	margin-left:auto !important;
	gap:6px !important;
}

.gbs-note-overview-actions button{
	width:36px !important;
	height:36px !important;
	border-radius:10px !important;
}

/* Filters: compact, aligned, low visual weight */
.gbs-note-filters{
	padding-left:66px !important;
	gap:7px !important;
	margin-top:-28px !important;
	min-height:42px !important;
	align-items:center !important;
}

.gbs-note-filters button{
	height:36px !important;
	padding:0 12px !important;
	border-radius:9px !important;
	font-size:12px !important;
	line-height:36px !important;
}

.gbs-note-list{
	margin-top:4px !important;
	padding-top:2px !important;
}

/* Slightly tighter cards for better reading density */
.gbs-note-item{
	border-radius:12px !important;
	padding:7px !important;
	gap:8px !important;
}
.gbs-note-item-source{
	border-radius:8px !important;
}
.gbs-note-item-content{
	font-size:12.5px !important;
	line-height:1.5 !important;
}

/* Desktop / tablet: give the overlay some breathing room from browser chrome */
@media(min-width:621px){
	.gbs-note-overview{
		top:max(42px, calc(env(safe-area-inset-top) + 28px)) !important;
	}
}

/* Phone: still not flush to the top. Keep bottom-sheet behavior compact. */
@media(max-width:620px){
	.gbs-note-overview{
		top:auto !important;
		left:10px !important;
		right:10px !important;
		bottom:max(12px, calc(env(safe-area-inset-bottom) + 8px)) !important;
		width:auto !important;
		max-height:min(72vh, 600px) !important;
		padding:12px !important;
		border-radius:18px !important;
	}
	.gbs-note-overview-head{
		min-height:56px !important;
		padding-left:58px !important;
	}
	.gbs-note-overview-title-mongol{
		left:6px !important;
		top:4px !important;
		width:44px !important;
		height:50px !important;
	}
	.gbs-note-overview-title-mongol > span{
		font-size:9px !important;
	}
	.gbs-note-filters{
		padding-left:58px !important;
		margin-top:-24px !important;
		gap:6px !important;
	}
	.gbs-note-filters button{
		height:34px !important;
		padding:0 10px !important;
		line-height:34px !important;
		font-size:11px !important;
	}
}

@media(prefers-color-scheme:dark){
	.gbs-note-overview-title-mongol > span{
		color:#eef3f6 !important;
	}
}


/* v2.3.30: keep 150px of breathing room between the bookshelf and site footer. */
body.gbs-bookshelf-page .gbs-bookshelf {
	margin-bottom: 150px !important;
}
@media (max-width:760px) {
	body.gbs-bookshelf-page .gbs-bookshelf {
		margin-bottom: 150px !important;
	}
}
