:root {
	--rabtoon-library-navy: #001A46;
	--rabtoon-library-orange: #FF7E33;
	--rabtoon-library-text: #101828;
	--rabtoon-library-muted: #667085;
	--rabtoon-library-soft: #F6F8FB;
	--rabtoon-library-border: #E6EAF0;
}

.rabtoon-library-page,
.rabtoon-library-page * { box-sizing: border-box; }

.rabtoon-library-page {
	width: 100%;
	padding: 38px 20px 70px;
	background: var(--rabtoon-library-soft);
}

.rabtoon-library,
.rabtoon-library-login {
	width: min(1180px, 100%);
	margin: 0 auto;
}

.rabtoon-library__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 30px;
}

.rabtoon-library__head > div > span {
	display: block;
	margin-bottom: 6px;
	color: var(--rabtoon-library-orange);
	font-size: 11px;
	font-weight: 900;
	letter-spacing: .09em;
	text-transform: uppercase;
}

.rabtoon-library__head h1,
.rabtoon-library-login h1 {
	margin: 0;
	color: var(--rabtoon-library-text);
	font-size: clamp(32px, 4vw, 46px);
	line-height: 1.08;
	font-weight: 900;
	letter-spacing: -.04em;
}

.rabtoon-library__head p,
.rabtoon-library-login p {
	margin: 9px 0 0;
	color: var(--rabtoon-library-muted);
	font-size: 14px;
	line-height: 1.65;
}

.rabtoon-library__head > a,
.rabtoon-library-login a {
	min-height: 43px;
	padding: 0 15px;
	border: 1px solid var(--rabtoon-library-border);
	border-radius: 999px;
	background: #fff;
	color: var(--rabtoon-library-navy);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 800;
	text-decoration: none;
	white-space: nowrap;
}

.rabtoon-library-section {
	margin-top: 28px;
	padding: 22px;
	border: 1px solid var(--rabtoon-library-border);
	border-radius: 18px;
	background: #fff;
}

.rabtoon-library-section__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 18px;
}

.rabtoon-library-section__head h2,
.rabtoon-library-profile__head h2 {
	margin: 0;
	color: var(--rabtoon-library-text);
	font-size: 24px;
	font-weight: 850;
}

.rabtoon-library-section__head span {
	min-width: 30px;
	height: 30px;
	padding: 0 9px;
	border-radius: 999px;
	background: var(--rabtoon-library-soft);
	color: var(--rabtoon-library-muted);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 800;
}

.rabtoon-library-grid {
	grid-template-columns: repeat(6, minmax(0,1fr));
	gap: 22px 16px;
}

.rabtoon-library-empty {
	padding: 20px;
	border: 1px dashed var(--rabtoon-library-border);
	border-radius: 12px;
	background: var(--rabtoon-library-soft);
	color: var(--rabtoon-library-muted);
	font-size: 13px;
	font-weight: 650;
	text-align: center;
}

.rabtoon-library-profile {
	margin-top: 28px;
	padding: 22px;
	border: 1px solid var(--rabtoon-library-border);
	border-radius: 18px;
	background: #fff;
}

.rabtoon-library-profile__head p {
	max-width: 780px;
	margin: 7px 0 0;
	color: var(--rabtoon-library-muted);
	font-size: 13px;
	line-height: 1.6;
}

.rabtoon-library-profile__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0,1fr));
	gap: 14px;
	margin-top: 18px;
}

.rabtoon-library-profile label > span {
	display: block;
	margin-bottom: 7px;
	color: var(--rabtoon-library-text);
	font-size: 12px;
	font-weight: 800;
}

.rabtoon-library-profile select {
	width: 100%;
	height: 46px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid var(--rabtoon-library-border);
	border-radius: 11px;
	background: var(--rabtoon-library-soft);
	color: var(--rabtoon-library-text);
	font: inherit;
	font-size: 13px;
	box-shadow: none;
}

.rabtoon-library-profile__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-top: 16px;
}

.rabtoon-library-profile__footer button {
	min-height: 44px;
	padding: 0 18px;
	border: 0;
	border-radius: 999px;
	background: var(--rabtoon-library-navy);
	color: #fff;
	font: inherit;
	font-size: 12px;
	font-weight: 800;
	cursor: pointer;
}

.rabtoon-library-profile__footer button:disabled { opacity: .6; cursor: wait; }

[data-rabtoon-profile-message] {
	color: var(--rabtoon-library-muted);
	font-size: 12px;
	font-weight: 700;
}

[data-rabtoon-profile-message][data-type="success"] { color: #027A48; }
[data-rabtoon-profile-message][data-type="error"] { color: #B42318; }

.rabtoon-library-login {
	padding: 38px;
	border: 1px solid var(--rabtoon-library-border);
	border-radius: 18px;
	background: #fff;
	text-align: center;
}

.rabtoon-library-login a { margin-top: 18px; background: var(--rabtoon-library-orange); border-color: var(--rabtoon-library-orange); color: #fff; }

@media (max-width: 1180px) { .rabtoon-library-grid { grid-template-columns: repeat(5, minmax(0,1fr)); } }
@media (max-width: 980px) { .rabtoon-library-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } }
@media (max-width: 760px) {
	.rabtoon-library-page { padding: 26px 13px 50px; }
	.rabtoon-library__head { flex-direction: column; }
	.rabtoon-library-section,
	.rabtoon-library-profile { padding: 16px; border-radius: 15px; }
	.rabtoon-library-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px 12px; }
}
@media (max-width: 560px) {
	.rabtoon-library-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
	.rabtoon-library-profile__grid { grid-template-columns: 1fr; }
	.rabtoon-library-profile__footer { align-items: stretch; flex-direction: column; }
	.rabtoon-library-profile__footer button { width: 100%; }
}

html[dir="rtl"] .rabtoon-library-page { direction: rtl; }

/* Creator following in the library (v1.6) */
.rabtoon-library-creator-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0,1fr));
	gap: 14px;
}
.rabtoon-library-creator-grid .rabtoon-creator-mini-card {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 12px;
	border: 1px solid var(--rabtoon-library-border);
	border-radius: 14px;
	background: #fff;
	color: inherit;
	text-decoration: none;
}
.rabtoon-library-creator-grid .rabtoon-creator-mini-card__avatar {
	width: 50px;
	height: 50px;
	flex: 0 0 50px;
	border-radius: 50%;
	overflow: hidden;
	background: var(--rabtoon-library-navy);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 900;
}
.rabtoon-library-creator-grid .rabtoon-creator-mini-card__avatar img { width:100%; height:100%; object-fit:cover; }
.rabtoon-library-creator-grid .rabtoon-creator-mini-card__body strong,
.rabtoon-library-creator-grid .rabtoon-creator-mini-card__body span,
.rabtoon-library-creator-grid .rabtoon-creator-mini-card__body small { display:block; }
.rabtoon-library-creator-grid .rabtoon-creator-mini-card__body strong { color:var(--rabtoon-library-text); font-size:13px; }
.rabtoon-library-creator-grid .rabtoon-creator-mini-card__body span { color:var(--rabtoon-library-muted); font-size:11px; margin-top:2px; }
.rabtoon-library-creator-grid .rabtoon-creator-mini-card__body small { color:var(--rabtoon-library-orange); font-size:10px; font-weight:750; margin-top:3px; }
@media(max-width:980px){.rabtoon-library-creator-grid{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:720px){.rabtoon-library-creator-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:440px){.rabtoon-library-creator-grid{grid-template-columns:1fr;}}

.rabtoon-library a,
.rabtoon-library a:hover,
.rabtoon-library a:focus,
.rabtoon-library button,
.rabtoon-library button:hover {
	text-decoration: none !important;
}

/* v1.11 Continue Reading */
.rabtoon-continue-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0,1fr));
	gap: 14px;
}

.rabtoon-continue-card {
	min-width: 0;
	display: grid;
	grid-template-columns: 92px minmax(0,1fr);
	gap: 13px;
	padding: 12px;
	border: 1px solid var(--rabtoon-library-border);
	border-radius: 14px;
	background: #fff;
}

.rabtoon-continue-card__cover {
	display: block;
	aspect-ratio: 5 / 7;
	border-radius: 10px;
	overflow: hidden;
	background: var(--rabtoon-library-navy);
	color: #fff !important;
	text-decoration: none !important;
}

.rabtoon-continue-card__cover img,
.rabtoon-continue-card__cover > span {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	object-fit: cover;
	font-weight: 900;
}

.rabtoon-continue-card__body {
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.rabtoon-continue-card__title {
	color: var(--rabtoon-library-navy) !important;
	font-size: 14px;
	font-weight: 850;
	line-height: 1.35;
	text-decoration: none !important;
}

.rabtoon-continue-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 5px 10px;
	margin-top: 6px;
	color: var(--rabtoon-library-muted);
	font-size: 10px;
	font-weight: 700;
}

.rabtoon-continue-card__progress {
	height: 6px;
	margin-top: auto;
	border-radius: 999px;
	background: #EEF1F5;
	overflow: hidden;
}

.rabtoon-continue-card__progress span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--rabtoon-library-orange);
}

.rabtoon-continue-card__actions {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 9px;
}

.rabtoon-continue-card__actions a,
.rabtoon-continue-card__actions button {
	min-height: 32px;
	padding: 0 10px;
	border: 1px solid var(--rabtoon-library-border);
	border-radius: 999px;
	background: #fff;
	color: var(--rabtoon-library-navy);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font: inherit;
	font-size: 10px;
	font-weight: 800;
	cursor: pointer;
	text-decoration: none !important;
}

.rabtoon-continue-card__actions a {
	border-color: var(--rabtoon-library-navy);
	background: var(--rabtoon-library-navy);
	color: #fff !important;
}

.rabtoon-continue-card__actions a:hover,
.rabtoon-continue-card__actions button:hover {
	border-color: var(--rabtoon-library-orange);
	background: var(--rabtoon-library-orange);
	color: #fff !important;
}

@media (max-width: 760px) {
	.rabtoon-continue-grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
	.rabtoon-continue-card { grid-template-columns: 78px minmax(0,1fr); gap: 10px; padding: 10px; }
}


/* ==========================================================
   v1.15.16 — MY LIBRARY ARABIC RTL ALIGNMENT
   Keep English and all existing sizing/layout unchanged.
========================================================== */
html[dir="rtl"] .rabtoon-library__head > div:first-child,
html[dir="rtl"] .rabtoon-library-profile__head,
html[dir="rtl"] .rabtoon-library-profile form {
	direction: rtl;
	text-align: right;
}

html[dir="rtl"] .rabtoon-library__head > div:first-child > span,
html[dir="rtl"] .rabtoon-library__head > div:first-child > h1,
html[dir="rtl"] .rabtoon-library__head > div:first-child > p,
html[dir="rtl"] .rabtoon-library-profile__head > h2,
html[dir="rtl"] .rabtoon-library-profile__head > p,
html[dir="rtl"] .rabtoon-library-profile label > span,
html[dir="rtl"] .rabtoon-library-profile select,
html[dir="rtl"] [data-rabtoon-profile-message] {
	text-align: right;
}

html[dir="rtl"] .rabtoon-library-profile__footer {
	direction: rtl;
}
