/* ==========================================================================
   Manhatic — main stylesheet
   Logical properties are used everywhere so RTL (default) and LTR both work.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
	--mh-primary: #dc2626;
	--mh-primary-fg: #fff;
	--mh-blue: #2563eb;
	--mh-discord: #5865f2;
	--mh-green: #22c55e;
	--mh-orange: #f59e0b;
	--mh-pink: #ec4899;
	--mh-purple: #a855f7;
	--mh-radius: 12px;
	--mh-radius-sm: calc(var(--mh-radius) * .66);
	--mh-radius-lg: calc(var(--mh-radius) * 1.4);
	--mh-container: 1280px;
	--mh-header-h: 64px;
	--mh-font: "Cairo", system-ui, sans-serif;
	--mh-logo-h: 34px;
	--mh-ease: cubic-bezier(.2, .8, .2, 1);
}

html[data-scheme="dark"], html:not([data-scheme]) {
	color-scheme: dark;
	--bg: #0a0a0a;
	--bg-2: #111111;
	--card: #121212;
	--card-2: #181818;
	--soft: #1c1c1c;
	--soft-2: #262626;
	--border: #262626;
	--border-2: #333;
	--fg: #fafafa;
	--fg-2: #e5e5e5;
	--muted: #a3a3a3;
	--muted-2: #737373;
	--shadow: 0 10px 30px rgba(0, 0, 0, .45);
	--glass: rgba(10, 10, 10, .72);
}

html[data-scheme="light"] {
	color-scheme: light;
	--bg: #f7f7f8;
	--bg-2: #ffffff;
	--card: #ffffff;
	--card-2: #fafafa;
	--soft: #f2f2f3;
	--soft-2: #e8e8ea;
	--border: #e5e5e5;
	--border-2: #d4d4d8;
	--fg: #0a0a0a;
	--fg-2: #262626;
	--muted: #6b6b70;
	--muted-2: #8b8b90;
	--shadow: 0 10px 30px rgba(0, 0, 0, .08);
	--glass: rgba(255, 255, 255, .8);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: var(--mh-font);
	font-size: 15px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}
img, svg, video { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--mh-primary); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 700; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--mh-primary); outline-offset: 2px; }
::selection { background: var(--mh-primary); color: #fff; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.mh-skip:focus { position: fixed !important; inset-block-start: 8px; inset-inline-start: 8px; width: auto; height: auto; clip: auto; z-index: 999; background: var(--mh-primary); color: #fff; padding: 8px 14px; border-radius: 8px; }
.mh-icon { flex: none; vertical-align: middle; }
.mh-muted { color: var(--muted); }
.mh-hp { position: absolute; inset-inline-start: -9999px; opacity: 0; }
kbd { background: var(--soft-2); border-radius: 4px; padding: 0 6px; font-size: 12px; }

.mh-main { flex: 1; padding-block-end: 48px; }
.mh-container { width: 100%; max-width: var(--mh-container); margin-inline: auto; padding-inline: 16px; }
.mh-container--reader { max-width: 860px; }

html[data-scheme="dark"] .mh-show-light, html[data-scheme="light"] .mh-show-dark { display: none; }

/* scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--soft-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--soft-2); border-radius: 10px; border: 2px solid var(--bg); }

/* ---------- Buttons ---------- */
.mh-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 40px; padding: 8px 16px;
	border-radius: var(--mh-radius-sm);
	font-weight: 600; font-size: 14px; line-height: 1.2;
	border: 1px solid transparent;
	transition: background .2s, color .2s, border-color .2s, transform .15s, opacity .2s;
	white-space: nowrap; user-select: none;
}
.mh-btn:active { transform: scale(.98); }
.mh-btn--primary { background: var(--mh-primary); color: var(--mh-primary-fg); box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--mh-primary) 70%, transparent); }
.mh-btn--primary:hover { color: #fff; filter: brightness(1.08); }
.mh-btn--primary-soft { background: color-mix(in srgb, var(--mh-primary) 18%, transparent); color: var(--fg); border-color: color-mix(in srgb, var(--mh-primary) 40%, transparent); }
.mh-btn--primary-soft:hover { background: color-mix(in srgb, var(--mh-primary) 28%, transparent); color: var(--fg); }
.mh-btn--blue { background: var(--mh-blue); color: #fff; }
.mh-btn--blue:hover { color: #fff; filter: brightness(1.1); }
.mh-btn--discord { background: var(--mh-discord); color: #fff; border-radius: 999px; padding-inline: 22px; }
.mh-btn--discord:hover { color: #fff; filter: brightness(1.1); }
.mh-btn--danger { background: var(--mh-primary); color: #fff; border-radius: 999px; }
.mh-btn--danger:hover { color: #fff; }
.mh-btn--ghost { background: var(--soft); border-color: var(--border); color: var(--fg); }
.mh-btn--ghost:hover { background: var(--soft-2); color: var(--fg); }
.mh-btn--sm { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.mh-btn--lg { min-height: 48px; padding: 10px 20px; font-size: 15px; }
.mh-btn--block { width: 100%; }
.mh-btn.is-disabled, .mh-btn:disabled { opacity: .45; pointer-events: none; }

.mh-iconbtn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px; border-radius: 999px; position: relative;
	color: var(--fg-2); transition: background .2s, color .2s;
}
.mh-iconbtn:hover { background: var(--soft); color: var(--fg); }
.mh-iconbtn--outline { border: 1px solid var(--border); border-radius: var(--mh-radius-sm); background: var(--card); }
.mh-iconbtn--sm { width: 28px; height: 28px; }
.mh-iconbtn--lg { width: 52px; height: 52px; background: var(--glass); backdrop-filter: blur(8px); }
.mh-link { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.mh-link:hover { color: var(--mh-primary); }

.mh-badge-count {
	position: absolute; inset-block-start: 4px; inset-inline-end: 2px;
	min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px;
	background: var(--mh-primary); color: #fff; font-size: 10px; font-weight: 700;
	display: inline-flex; align-items: center; justify-content: center; line-height: 1;
}
.mh-btn .mh-badge-count { position: static; }

/* ---------- Chips / tags / pills ---------- */
.mh-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mh-chip {
	display: inline-flex; align-items: center; gap: 4px;
	padding: 3px 12px; border-radius: 999px; font-size: 12.5px;
	background: var(--soft); border: 1px solid var(--border); color: var(--fg-2);
	transition: background .2s, border-color .2s;
}
a.mh-chip:hover { border-color: var(--mh-primary); color: var(--fg); }
.mh-chip small { color: var(--muted); }
.mh-chip--accent { background: color-mix(in srgb, var(--mh-purple) 18%, transparent); border-color: color-mix(in srgb, var(--mh-purple) 35%, transparent); color: #e9d5ff; }
html[data-scheme="light"] .mh-chip--accent { color: #7e22ce; }
.mh-chips--sm .mh-chip { font-size: 11px; padding: 1px 9px; }
.mh-chips--lg .mh-chip { font-size: 14px; padding: 6px 16px; }
.mh-chips--glass .mh-chip { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .15); color: #fff; backdrop-filter: blur(6px); }
.mh-chips--toggle .mh-chip { cursor: pointer; }
.mh-chips--toggle .mh-chip input { display: none; }
.mh-chips--toggle .mh-chip:has(input:checked) { background: var(--mh-primary); border-color: var(--mh-primary); color: #fff; }
.mh-chips--tags { margin-block: 14px; }

.mh-pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.mh-pill--free { color: var(--mh-green); background: color-mix(in srgb, var(--mh-green) 12%, transparent); border: 1px solid color-mix(in srgb, var(--mh-green) 35%, transparent); }
.mh-pill--lock { color: var(--mh-orange); background: color-mix(in srgb, var(--mh-orange) 12%, transparent); border: 1px solid color-mix(in srgb, var(--mh-orange) 35%, transparent); }

.mh-tag {
	position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 3px;
	padding: 3px 9px; border-radius: 7px; font-size: 11px; font-weight: 700; line-height: 1.3;
}
.mh-tag--type { inset-block-start: 8px; inset-inline-end: 8px; background: var(--mh-pink); color: #fff; }
.mh-tag--pin { inset-block-end: 8px; inset-inline-end: 8px; background: rgba(0, 0, 0, .7); color: #fff; backdrop-filter: blur(4px); }
.mh-tag--chap { inset-block-start: 8px; inset-inline-start: 8px; background: rgba(0, 0, 0, .7); color: #fff; backdrop-filter: blur(4px); }
.mh-tag--rate { inset-block-end: 8px; inset-inline-start: 8px; background: rgba(0, 0, 0, .7); color: #fff; backdrop-filter: blur(4px); }
.mh-tag--rate .mh-icon { color: #facc15; fill: #facc15; }
.manga-title-badges.mh-badge { position: absolute; z-index: 2; inset-block-start: 36px; inset-inline-end: 8px; background: var(--mh-primary); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.manga-title-badges.mh-badge--adult { background: #000; border: 1px solid var(--mh-primary); inset-block-start: auto; inset-block-end: 8px; }

.mh-rating { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--fg-2); font-weight: 600; }
.mh-rating .mh-icon { color: #fb923c; fill: #fb923c; }
.mh-status { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.mh-status i { width: 8px; height: 8px; border-radius: 99px; background: var(--mh-green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mh-green) 20%, transparent); }
.mh-status--completed i { background: var(--mh-blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mh-blue) 20%, transparent); }
.mh-status--canceled i, .mh-status--hold i { background: var(--mh-orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mh-orange) 20%, transparent); }
.mh-dot { display: inline-block; width: 9px; height: 9px; border-radius: 99px; background: var(--c, var(--mh-primary)); flex: none; }

/* ---------- Header ---------- */
.mh-header {
	position: relative; z-index: 50; background: var(--glass);
	backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
	border-block-end: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}
.mh-sticky-header .mh-header { position: sticky; inset-block-start: 0; }
.admin-bar.mh-sticky-header .mh-header { inset-block-start: 32px; }
.mh-header__inner { display: flex; align-items: center; gap: 18px; height: var(--mh-header-h); }
.mh-header__burger { display: none; }
.mh-logo { display: inline-flex; align-items: center; flex: none; }
.mh-logo__img { height: var(--mh-logo-h); width: auto; }
.mh-logo__img--light { display: none; }
html[data-scheme="light"] .mh-logo__img--dark:has(+ .mh-logo__img--light) { display: none; }
html[data-scheme="light"] .mh-logo__img--light { display: block; }
.mh-logo__text { font-weight: 800; font-size: 22px; letter-spacing: .5px; background: linear-gradient(90deg, var(--fg), var(--mh-primary)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.mh-nav { flex: 1; min-width: 0; }
.mh-nav__list, .mh-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.mh-nav li { position: relative; }
.mh-nav a { display: flex; align-items: center; gap: 7px; padding: 8px 12px; font-size: 14.5px; font-weight: 600; color: var(--fg-2); border-radius: 8px; position: relative; white-space: nowrap; }
.mh-nav a:hover { color: var(--fg); background: var(--soft); }
.mh-nav .current-menu-item > a, .mh-nav .current-menu-ancestor > a { color: var(--fg); }
.mh-nav .current-menu-item > a::after, .mh-nav .current-menu-ancestor > a::after { content: ""; position: absolute; inset-inline: 10px; inset-block-end: -13px; height: 2px; border-radius: 2px; background: var(--mh-primary); }
.mh-nav__icon { opacity: .85; }
.mh-nav .sub-menu { position: absolute; inset-block-start: 100%; inset-inline-start: 0; min-width: 200px; flex-direction: column; align-items: stretch; background: var(--card); border: 1px solid var(--border); border-radius: var(--mh-radius); padding: 6px; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s var(--mh-ease); }
.mh-nav li:hover > .sub-menu, .mh-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.mh-nav .sub-menu a::after { display: none; }
.mh-header__actions { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.mh-avatar { width: 38px; height: 38px; border-radius: 999px; overflow: hidden; border: 2px solid var(--mh-primary); display: block; }
.mh-avatar { position: relative; background: linear-gradient(135deg, var(--mh-primary), #7c3aed); }
.mh-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mh-avatar__letter { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #fff; font-weight: 800; }
.mh-progress { position: absolute; inset-inline: 0; inset-block-end: -1px; height: 2px; }
.mh-progress span { display: block; height: 100%; width: 0; background: var(--mh-primary); transition: width .15s linear; }

/* dropdown & menus */
.mh-dropdown { position: relative; }
.mh-dropdown__panel { position: absolute; inset-block-start: calc(100% + 10px); inset-inline-end: 0; z-index: 60; min-width: 230px; }
.mh-menu { background: var(--card); border: 1px solid var(--border); border-radius: var(--mh-radius); padding: 6px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.mh-menu__head { padding: 8px 10px 10px; border-block-end: 1px solid var(--border); margin-block-end: 6px; display: flex; flex-direction: column; font-size: 13px; }
.mh-menu__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 8px; font-size: 14px; color: var(--fg-2); text-align: start; }
.mh-menu__item:hover { background: var(--soft); color: var(--fg); }
.mh-menu__item--danger { color: #f87171; }
.mh-menu__check { margin-inline-start: auto; opacity: 0; color: var(--mh-green); }
.mh-menu__item.is-active .mh-menu__check { opacity: 1; }
.mh-menu__item.is-active { color: var(--fg); background: var(--soft); }

.mh-bell { width: min(380px, calc(100vw - 24px)); background: var(--card); border: 1px solid var(--border); border-radius: var(--mh-radius); box-shadow: var(--shadow); overflow: hidden; }
.mh-bell__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-block-end: 1px solid var(--border); font-size: 13px; }
.mh-bell__list { max-height: 420px; overflow: auto; }
.mh-bell__empty { padding: 26px 18px; text-align: center; font-size: 13px; margin: 0; }
.mh-bell__item { display: flex; gap: 12px; padding: 10px 14px; border-block-end: 1px solid var(--border); align-items: center; }
.mh-bell__item:hover { background: var(--soft); color: inherit; }
.mh-bell__item img { width: 44px; height: 60px; object-fit: cover; border-radius: 8px; }
.mh-bell__item strong { display: block; font-size: 14px; line-height: 1.4; }
.mh-bell__item span { font-size: 12px; color: var(--muted); }
.mh-bell__item b { color: var(--mh-primary); }

/* drawer */
.mh-drawer { position: fixed; inset: 0; z-index: 100; }
.mh-drawer__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); animation: mh-fade .2s; }
.mh-drawer__panel { position: absolute; inset-block: 0; inset-inline-start: 0; width: min(320px, 86vw); background: var(--bg-2); border-inline-end: 1px solid var(--border); display: flex; flex-direction: column; animation: mh-slide-in .25s var(--mh-ease); }
[dir="rtl"] .mh-drawer__panel { animation-name: mh-slide-in-rtl; }
.mh-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-block-end: 1px solid var(--border); }
.mh-drawer__nav { flex: 1; overflow: auto; padding: 10px; }
.mh-drawer__list, .mh-drawer__nav ul { list-style: none; margin: 0; padding: 0; }
.mh-drawer__nav a { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 10px; font-weight: 600; }
.mh-drawer__nav a:hover, .mh-drawer__nav .current-menu-item > a { background: var(--soft); color: var(--fg); }
.mh-drawer__nav .sub-menu { padding-inline-start: 18px; }
.mh-drawer__foot { padding: 14px 16px; border-block-start: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

@keyframes mh-fade { from { opacity: 0; } }
@keyframes mh-slide-in { from { transform: translateX(-100%); } }
@keyframes mh-slide-in-rtl { from { transform: translateX(100%); } }
@keyframes mh-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes mh-spin { to { transform: rotate(360deg); } }
@keyframes mh-shimmer { 100% { transform: translateX(100%); } }

/* ---------- Sections ---------- */
.mh-section { margin-block: 36px; }
.mh-section--tight { margin-block: 20px; }
.mh-section__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-block-end: 16px; flex-wrap: wrap; }
.mh-section__title { display: flex; align-items: center; gap: 9px; font-size: 21px; font-weight: 800; }
.mh-section__icon { color: var(--fg); }
.mh-section__extra { display: flex; align-items: center; gap: 8px; }
.mh-page-title { font-size: clamp(22px, 3vw, 30px); font-weight: 800; display: flex; align-items: center; gap: 10px; }

.mh-seg { display: inline-flex; gap: 6px; }
.mh-seg__item { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 9px; font-size: 13.5px; font-weight: 600; border: 1px solid var(--border); background: var(--card); color: var(--muted); }
.mh-seg__item.is-active { background: var(--soft-2); color: var(--fg); border-color: var(--border-2); }
.mh-seg__item.is-active .mh-icon { color: var(--mh-primary); }

.mh-scroller { display: grid; grid-auto-flow: column; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding-block-end: 8px; scrollbar-width: none; }
.mh-scroller::-webkit-scrollbar { display: none; }
.mh-scroller > * { scroll-snap-align: start; }

/* ---------- Hero ---------- */
.mh-hero { --slide-w: min(860px, 62vw); position: relative; max-width: calc(var(--mh-container) + 220px); margin: 16px auto 0; }
.mh-hero__track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-inline: calc(50% - var(--slide-w) / 2); padding-block: 8px; }
.mh-hero__track::-webkit-scrollbar { display: none; }
.mh-hero__slide { position: relative; flex: 0 0 var(--slide-w); height: clamp(320px, 38vw, 500px); border-radius: var(--mh-radius-lg); overflow: hidden; scroll-snap-align: center; isolation: isolate; transition: transform .5s var(--mh-ease), opacity .5s; opacity: .55; transform: scale(.94); background: var(--card); }
.mh-hero__slide.is-active { opacity: 1; transform: none; }
.mh-hero__bg { position: absolute; inset: -20px; background-size: cover; background-position: center; filter: blur(2px) brightness(.55); transform: scale(1.05); z-index: -2; }
.mh-hero__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(0, 0, 0, .9), rgba(0, 0, 0, .1) 60%), linear-gradient(to left, rgba(0, 0, 0, .35), transparent 60%); }
.mh-hero__content { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 32px clamp(20px, 4vw, 48px); }
.mh-hero__cover { flex: none; width: clamp(140px, 17vw, 210px); aspect-ratio: 5 / 7; border-radius: 14px; overflow: hidden; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .7); transform: rotate(-4deg); transition: transform .4s var(--mh-ease); }
[dir="rtl"] .mh-hero__cover { transform: rotate(4deg); }
.mh-hero__slide:hover .mh-hero__cover { transform: rotate(0) scale(1.03); }
.mh-hero__cover img { width: 100%; height: 100%; object-fit: cover; }
.mh-hero__info { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; flex: 1; color: #fff; }
.mh-hero__rating { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 99px; background: rgba(255, 255, 255, .14); backdrop-filter: blur(6px); font-size: 13px; font-weight: 700; }
.mh-hero__rating .mh-icon { color: #facc15; fill: #facc15; }
.mh-hero__title { font-size: clamp(22px, 2.7vw, 34px); font-weight: 800; text-shadow: 0 3px 16px rgba(0, 0, 0, .6); max-width: 520px; }
.mh-hero__title a:hover { color: #fff; }
.mh-hero__cta { border-radius: 999px; padding-inline: 26px; }
.mh-hero__nav { position: absolute; inset-block-start: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 999px; background: var(--glass); backdrop-filter: blur(8px); border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; z-index: 3; }
.mh-hero__nav:hover { background: var(--mh-primary); color: #fff; }
.mh-hero__nav--prev { inset-inline-start: 12px; }
.mh-hero__nav--next { inset-inline-end: 12px; }
.mh-hero__dots { display: flex; justify-content: center; gap: 6px; margin-block-start: 10px; }
.mh-hero__dots button { width: 7px; height: 7px; border-radius: 99px; background: var(--soft-2); transition: width .3s, background .3s; }
.mh-hero__dots button.is-active { width: 24px; background: var(--mh-primary); }

/* ---------- Share / help bars ---------- */
.mh-sharebar { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.mh-sharebar__card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; border-radius: var(--mh-radius-lg); background: var(--card); border: 1px solid var(--border); }
.mh-sharebar__text { display: flex; flex-direction: column; }
.mh-sharebar__text span { color: var(--muted); font-size: 13px; }
.mh-sharebar .mh-btn--blue { border-radius: 999px; padding-inline: 22px; }
.mh-helpbar { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--mh-radius-lg); background: var(--card); border: 1px solid var(--border); border-inline-start: 3px solid var(--mh-primary); }
.mh-helpbar__icon { width: 40px; height: 40px; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; color: var(--mh-primary); background: color-mix(in srgb, var(--mh-primary) 15%, transparent); flex: none; }
.mh-helpbar__text { flex: 1; display: flex; flex-direction: column; }
.mh-helpbar__text span { color: var(--muted); font-size: 13px; }

/* ---------- Trending ---------- */
.mh-trend { grid-auto-columns: calc((100% - 6 * 14px) / 7); grid-template-rows: repeat(2, auto); }
.mh-tcard { position: relative; display: block; aspect-ratio: 5 / 7; border-radius: var(--mh-radius); overflow: hidden; background: var(--card); }
.mh-tcard img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--mh-ease); }
.mh-tcard:hover img { transform: scale(1.06); }
.mh-tcard__title { position: absolute; inset-inline: 0; inset-block-end: 0; padding: 30px 10px 10px; background: linear-gradient(to top, rgba(0, 0, 0, .92), transparent); color: #fff; font-size: 12.5px; font-weight: 700; text-align: center; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Announcements ---------- */
.mh-news { display: grid; gap: 10px; }
.mh-news__item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--mh-radius); background: var(--card); border: 1px solid var(--border); }
.mh-news__item:hover { border-color: var(--border-2); color: inherit; }
.mh-news__icon { width: 34px; height: 34px; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--mh-primary) 15%, transparent); color: var(--mh-primary); flex: none; }
.mh-news__body { flex: 1; display: flex; flex-direction: column; }
.mh-news__body .mh-muted { font-size: 12px; }
.mh-news__arrow { color: var(--muted); }

/* ---------- Latest releases cards ---------- */
.mh-lgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mh-lcard { display: grid; grid-template-columns: 44% 1fr; gap: 12px; padding: 10px; border-radius: var(--mh-radius-lg); background: var(--card); border: 1px solid var(--border); transition: border-color .2s, transform .2s; }
.mh-lcard:hover { border-color: var(--border-2); }
.mh-lcard__cover { position: relative; display: block; border-radius: var(--mh-radius); overflow: hidden; aspect-ratio: 5 / 7.5; background: var(--soft); order: 2; }
[dir="rtl"] .mh-lcard__cover { order: 0; }
.mh-lcard__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--mh-ease); }
.mh-lcard:hover .mh-lcard__cover img { transform: scale(1.05); }
.mh-lcard__body { display: flex; flex-direction: column; min-width: 0; gap: 6px; }
.mh-lcard__title { font-size: 15.5px; font-weight: 800; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mh-lcard__meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.mh-lcard__chapters { display: flex; flex-direction: column; gap: 7px; margin-block-start: 4px; }
.mh-mchap { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 7px 10px; border-radius: 9px; background: var(--card-2); border: 1px solid var(--border); border-inline-start: 2px solid var(--border-2); font-size: 12.5px; min-height: 36px; }
.mh-mchap:hover { background: var(--soft); color: inherit; }
.mh-mchap.is-read { opacity: .55; }
.mh-mchap__name { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mh-mchap__date { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.mh-mchap__new { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: 11.5px; }
.mh-mchap__new .mh-icon, .mh-new .mh-icon { color: #ef4444; fill: #ef4444; }
.mh-mchap.is-locked { border-inline-start-color: var(--mh-orange); }
.mh-mchap.is-locked .mh-mchap__name { color: var(--mh-orange); }
.mh-mchap.is-free { border-inline-start-color: var(--mh-green); }
.mh-mchap.is-unlocked .mh-mchap__name { color: var(--mh-green); }

/* ---------- Poster cards ---------- */
.mh-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 18px 14px; }
.mh-pcard { min-width: 0; }
.mh-pcard__cover { position: relative; display: block; aspect-ratio: 5 / 7; border-radius: var(--mh-radius); overflow: hidden; background: var(--soft); margin-block-end: 8px; }
.mh-pcard__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--mh-ease); }
.mh-pcard:hover .mh-pcard__cover img { transform: scale(1.06); }
.mh-pcard__title { font-size: 14px; font-weight: 700; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-block-end: 6px; text-align: center; }
.mh-pcard .mh-chips { justify-content: center; }
.mh-pcard__lib { position: absolute; inset-block-end: 8px; inset-inline-end: 8px; z-index: 2; padding: 2px 8px; border-radius: 6px; font-size: 10.5px; font-weight: 700; color: #fff; background: var(--c, var(--mh-green)); }
.mh-scroller--cards { grid-auto-columns: minmax(150px, 170px); }

/* ---------- Ranking ---------- */
.mh-rank { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 28px; }
.mh-rank__item { display: flex; align-items: center; gap: 14px; }
.mh-rank__cover { width: 72px; flex: none; aspect-ratio: 5 / 7; border-radius: 10px; overflow: hidden; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .6); }
.mh-rank__cover img { width: 100%; height: 100%; object-fit: cover; }
.mh-rank__num { font-size: 34px; font-weight: 800; color: var(--fg); padding-inline-end: 12px; border-inline-end: 2px solid color-mix(in srgb, var(--mh-primary) 50%, transparent); line-height: 1; min-width: 44px; text-align: center; }
.mh-rank__item:nth-child(-n+3) .mh-rank__num { color: var(--mh-primary); }
.mh-rank__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mh-rank__title { font-weight: 700; font-size: 15px; line-height: 1.4; }

/* ---------- Continue reading ---------- */
.mh-continue__list { grid-auto-columns: minmax(280px, 320px); }
.mh-ccard { display: flex; gap: 12px; padding: 10px; border-radius: var(--mh-radius-lg); background: var(--card); border: 1px solid var(--border); position: relative; }
.mh-ccard:hover { border-color: var(--border-2); color: inherit; }
.mh-ccard img { width: 70px; aspect-ratio: 5 / 7; object-fit: cover; border-radius: 10px; flex: none; }
.mh-ccard__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.mh-ccard__title { font-weight: 700; font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mh-ccard__chap { font-size: 12.5px; color: var(--muted); }
.mh-ccard__new { font-size: 11.5px; color: var(--mh-green); font-weight: 700; }
.mh-ccard__bar { height: 4px; border-radius: 99px; background: var(--soft-2); overflow: hidden; margin-block-start: 4px; }
.mh-ccard__bar span { display: block; height: 100%; background: var(--mh-primary); border-radius: 99px; }
.mh-ccard__x { position: absolute; inset-block-start: 6px; inset-inline-end: 6px; opacity: 0; transition: opacity .2s; }
.mh-ccard:hover .mh-ccard__x { opacity: 1; }

/* ---------- Pagination ---------- */
.mh-pagination { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-block: 28px 8px; }
.mh-pagination ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; flex-wrap: wrap; justify-content: center; }
.mh-pagination .page-numbers { min-width: 36px; height: 36px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: var(--card); border: 1px solid var(--border); font-size: 13.5px; font-weight: 600; }
.mh-pagination a.page-numbers:hover { border-color: var(--mh-primary); color: var(--fg); }
.mh-pagination .page-numbers.current { background: var(--mh-primary); border-color: var(--mh-primary); color: #fff; }
.mh-pagination .dots { background: none; border: 0; }
.mh-pagination__info { font-size: 13px; color: var(--muted); }

/* ---------- Footer ---------- */
.mh-footer { border-block-start: 1px solid var(--border); background: var(--bg-2); padding-block: 36px 24px; text-align: center; }
.mh-footer__brand { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mh-footer__about { color: var(--muted); font-size: 13.5px; max-width: 620px; margin: 0; }
.mh-footer__nav ul { list-style: none; margin: 18px 0 0; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 22px; }
.mh-footer__nav a { color: var(--muted); font-size: 13.5px; }
.mh-footer__social { display: flex; justify-content: center; gap: 4px; margin-block-start: 14px; }
.mh-footer__bottom { border-block-start: 1px solid var(--border); margin-block-start: 22px; padding-block-start: 18px; color: var(--muted); font-size: 12.5px; }

/* ---------- Modals ---------- */
.mh-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; }
.mh-modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .65); backdrop-filter: blur(4px); animation: mh-fade .2s; }
.mh-modal__box { position: relative; width: min(480px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--mh-radius-lg); padding: 22px; box-shadow: var(--shadow); animation: mh-pop .25s var(--mh-ease); }
.mh-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-block-end: 12px; }
.mh-modal__head h3 { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.mh-modal__foot { display: flex; justify-content: flex-end; gap: 8px; margin-block-start: 16px; }
.mh-modal__x { position: absolute; inset-block-start: 12px; inset-inline-end: 12px; }
.mh-modal--wide .mh-modal__box { width: min(760px, 100%); }
.mh-modal--search { align-items: flex-start; padding-block-start: 10vh; }
.mh-modal--search .mh-modal__box { width: min(640px, 100%); padding: 0; overflow: hidden; }
.mh-search__form { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 14px; border-block-end: 1px solid var(--border); }
.mh-search__icon { color: var(--muted); }
.mh-search__input { flex: 1; height: 48px; border: 0; background: none; outline: none; font-size: 17px; }
.mh-search__input::-webkit-search-cancel-button { display: none; }
.mh-search__results { max-height: 60vh; overflow: auto; }
.mh-search__results:empty { display: none; }
.mh-sresult { display: flex; gap: 12px; align-items: center; padding: 10px 16px; border-block-end: 1px solid var(--border); }
.mh-sresult:hover, .mh-sresult.is-focus { background: var(--soft); color: inherit; }
.mh-sresult img { width: 46px; aspect-ratio: 5 / 7; border-radius: 7px; object-fit: cover; }
.mh-sresult strong { display: block; font-size: 14.5px; }
.mh-sresult span { font-size: 12px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.mh-search__msg { padding: 22px; text-align: center; color: var(--muted); }
.mh-search__foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; font-size: 13px; background: var(--card-2); }
.mh-search__foot a { display: inline-flex; gap: 6px; align-items: center; color: var(--mh-primary); font-weight: 600; }

/* forms */
.mh-form { display: flex; flex-direction: column; gap: 12px; }
.mh-form--grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.mh-form__actions { grid-column: 1 / -1; }
.mh-field { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 600; }
.mh-field > span { color: var(--fg-2); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mh-field input:not([type="checkbox"]):not([type="radio"]), .mh-field select, .mh-field textarea, .mh-select {
	width: 100%; min-height: 42px; padding: 9px 12px; border-radius: var(--mh-radius-sm);
	background: var(--bg-2); border: 1px solid var(--border); font-weight: 400; font-size: 14.5px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.mh-field input:focus, .mh-field select:focus, .mh-field textarea:focus, .mh-select:focus { border-color: var(--mh-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mh-primary) 20%, transparent); }
.mh-select { width: auto; }
.mh-form__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mh-form__msg { margin: 0; font-size: 13px; min-height: 0; }
.mh-form__msg.is-error { color: #f87171; }
.mh-form__msg.is-ok { color: var(--mh-green); }
.mh-form__note { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; color: var(--muted); margin: 0; }
.mh-check { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; cursor: pointer; font-weight: 400; }
.mh-check input, .mh-radio input { accent-color: var(--mh-primary); width: 16px; height: 16px; }
.mh-check--inline { font-size: 12px; color: var(--muted); }
.mh-radio-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mh-radio { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-2); cursor: pointer; font-size: 13.5px; }
.mh-radio:has(input:checked) { border-color: var(--mh-primary); background: color-mix(in srgb, var(--mh-primary) 10%, transparent); }

/* auth */
.mh-auth { width: min(420px, 100%); }
.mh-auth__brand { display: flex; justify-content: center; margin-block: 6px 16px; }
.mh-auth__tabs { margin-block-end: 14px; }
.mh-auth__perks { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 10px; background: var(--soft); margin-block-end: 14px; font-size: 12.5px; color: var(--fg-2); }
.mh-auth__perks span { display: flex; align-items: center; gap: 8px; }
.mh-auth__perks .mh-icon { color: var(--mh-primary); }
.mh-auth__back { align-self: center; }

/* tabs */
.mh-tabs { display: flex; gap: 6px; padding: 5px; background: var(--card); border: 1px solid var(--border); border-radius: 999px; }
.mh-tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: background .2s, color .2s; }
.mh-tab:hover { color: var(--fg); }
.mh-tab.is-active { background: var(--mh-primary); color: #fff; }
.mh-tab small { opacity: .8; font-weight: 500; }
.mh-tabs--pill { justify-content: flex-start; }
.mh-tabs--pill .mh-tab { flex: 0 0 auto; }
.mh-tabs--scroll { overflow-x: auto; scrollbar-width: none; border-radius: 14px; }
.mh-tabs--scroll .mh-tab { flex: 0 0 auto; }

/* toast */
.mh-toasts { position: fixed; z-index: 300; inset-block-end: 18px; inset-inline: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding-inline: 12px; }
.mh-toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 520px; padding: 11px 16px; border-radius: 12px; background: var(--fg); color: var(--bg); font-size: 14px; font-weight: 600; box-shadow: var(--shadow); animation: mh-pop .25s var(--mh-ease); }
.mh-toast--error { background: #b91c1c; color: #fff; }
.mh-toast a, .mh-toast button { text-decoration: underline; font-weight: 700; color: inherit; }
.mh-toast.is-leaving { opacity: 0; transform: translateY(8px); transition: .25s; }

/* notices */
.mh-notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--mh-radius); font-size: 13.5px; border: 1px solid var(--border); background: var(--card); }
.mh-notice p { margin: 2px 0 0; color: var(--muted); }
.mh-notice__actions { display: flex; gap: 8px; margin-inline-start: auto; align-self: center; flex-wrap: wrap; }
.mh-notice--hint { background: color-mix(in srgb, var(--mh-orange) 8%, var(--card)); border-color: color-mix(in srgb, var(--mh-orange) 30%, transparent); font-size: 12.5px; align-items: center; }
.mh-notice--hint .mh-icon { color: var(--mh-orange); }
.mh-notice--warn { background: color-mix(in srgb, var(--mh-orange) 8%, var(--card)); border-color: color-mix(in srgb, var(--mh-orange) 35%, transparent); }
.mh-notice--warn > .mh-icon { color: var(--mh-orange); }
.mh-notice--ok { border-color: color-mix(in srgb, var(--mh-green) 40%, transparent); color: var(--mh-green); }
.mh-notice--err { border-color: #7f1d1d; color: #f87171; }
.mh-empty { color: var(--muted); text-align: center; padding: 20px; }
.mh-empty--big { padding: 50px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.mh-empty--big .mh-icon { opacity: .5; }

/* cards */
.mh-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--mh-radius-lg); }
.mh-card--pad { padding: 22px; }
.mh-card__title { font-size: 18px; margin-block-end: 16px; }

/* ---------- Manga page ---------- */
.mh-manga { position: relative; padding-block-start: 22px; }
.mh-manga__backdrop { position: absolute; inset-inline: 0; inset-block-start: 0; height: 520px; background-size: cover; background-position: center 20%; filter: blur(32px) saturate(1.2); opacity: .32; z-index: -1; mask-image: linear-gradient(to bottom, #000 20%, transparent); -webkit-mask-image: linear-gradient(to bottom, #000 20%, transparent); pointer-events: none; }
html[data-scheme="light"] .mh-manga__backdrop { opacity: .2; }
.mh-manga__grid { display: grid; grid-template-columns: 290px minmax(0, 1fr) 270px; gap: 26px; align-items: start; }
.mh-manga__side { display: flex; flex-direction: column; gap: 14px; position: sticky; inset-block-start: calc(var(--mh-header-h) + 14px); }
.mh-manga__cover { position: relative; border-radius: var(--mh-radius-lg); overflow: hidden; aspect-ratio: 5 / 7; box-shadow: 0 25px 50px -20px rgba(0, 0, 0, .7); background: var(--soft); }
.mh-manga__cover img { width: 100%; height: 100%; object-fit: cover; }
.mh-manga__actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.mh-libbtn__label, .mh-manga__actions .mh-btn span { overflow: hidden; text-overflow: ellipsis; }
.mh-manga__actions > .mh-btn { min-height: 46px; }
.mh-manga__plugin-actions:empty { display: none; }
.mh-manga__plugin-actions .edit-btn a { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; border-radius: 10px; background: var(--soft); border: 1px solid var(--border); font-weight: 600; }
.mh-manga__plugin-actions .edit-btn .action_icon i::before { content: "✎"; font-style: normal; }
.mh-manga__plugin-actions .edit-btn .action_detail { display: none; }
.mh-manga__props:empty { display: none; }
.mh-manga__main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.mh-manga__mhead { display: none; }
.mh-manga__head { display: flex; flex-direction: column; gap: 8px; }
.mh-manga__title { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; line-height: 1.35; }
.mh-manga__alt { color: var(--muted); font-size: 13.5px; margin: 0; }
.mh-manga__related { display: flex; flex-direction: column; gap: 10px; position: sticky; inset-block-start: calc(var(--mh-header-h) + 14px); }
.mh-side-title { font-size: 15px; font-weight: 700; color: var(--fg-2); }
.mh-relitem { display: flex; gap: 12px; padding: 10px; border-radius: var(--mh-radius); background: color-mix(in srgb, var(--card) 85%, transparent); border: 1px solid var(--border); backdrop-filter: blur(6px); }
.mh-relitem:hover { border-color: var(--border-2); color: inherit; }
.mh-relitem img { width: 56px; aspect-ratio: 5 / 7; object-fit: cover; border-radius: 8px; flex: none; }
.mh-relitem__body { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.mh-relitem strong { font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mh-relitem .mh-muted { font-size: 11.5px; display: flex; gap: 8px; }

.mh-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 12px 6px; border-block: 1px solid var(--border); }
.mh-stat { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.mh-stat > div { display: flex; flex-direction: column; line-height: 1.2; }
.mh-stat b { font-size: 15px; }
.mh-stat span { font-size: 11px; color: var(--muted); }
.mh-stat__icon--star { color: var(--mh-purple); fill: var(--mh-purple); }
.mh-stat__icon--bm { color: #0ea5e9; fill: #0ea5e9; }
.mh-stat__icon--eye { color: var(--mh-green); }
.mh-info { margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; }
.mh-info > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mh-info dt { display: flex; align-items: center; gap: 8px; color: var(--fg-2); font-weight: 600; }
.mh-info dd { margin: 0; color: var(--muted); text-align: end; }
.mh-info dd a:hover { color: var(--mh-primary); }

/* library button */
.mh-libbtn { position: relative; display: flex; min-width: 0; }
.mh-libbtn__main { flex: 1; min-width: 0; overflow: hidden; border-start-end-radius: 0; border-end-end-radius: 0; min-height: 46px; padding-inline: 10px; }
.mh-libbtn__more { border-start-start-radius: 0; border-end-start-radius: 0; padding: 0 9px; min-height: 46px; border-inline-start: 1px solid rgba(255, 255, 255, .2); }
.mh-libbtn__menu { position: absolute; inset-block-start: calc(100% + 6px); inset-inline-end: 0; z-index: 40; min-width: 220px; }
.mh-libbtn.is-in .mh-libbtn__main, .mh-libbtn.is-in .mh-libbtn__more { background: var(--c, var(--mh-green)); }
.mh-libbtn.is-in .mh-libbtn__icon { fill: currentColor; }
.mh-libbtn--center { justify-content: center; max-width: 320px; width: 100%; margin-inline: auto; }

/* tabs panel / chapter list */
.mh-panel { display: flex; flex-direction: column; gap: 12px; }
.mh-chtools { display: flex; gap: 8px; }
.mh-chtools__search { flex: 1; display: flex; align-items: center; gap: 8px; padding-inline: 12px; height: 42px; border-radius: var(--mh-radius-sm); background: var(--card); border: 1px solid var(--border); color: var(--muted); }
.mh-chtools__search input { flex: 1; border: 0; background: none; outline: none; height: 100%; color: var(--fg); min-width: 0; }
.mh-chtools__search:focus-within { border-color: var(--mh-primary); }
.mh-markall { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--mh-radius); background: var(--card); border: 1px solid var(--border); text-align: start; }
.mh-markall:hover { border-color: var(--border-2); }
.mh-markall__icon { width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--mh-green); background: color-mix(in srgb, var(--mh-green) 14%, transparent); }
.mh-markall span:last-child { display: flex; flex-direction: column; }
.mh-markall small { color: var(--muted); font-size: 12px; }
.mh-chlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mh-chrow { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px; padding-inline-end: 14px; border-radius: var(--mh-radius); background: color-mix(in srgb, var(--card) 88%, transparent); border: 1px solid var(--border); transition: border-color .2s, background .2s; }
.mh-chrow:hover { border-color: var(--border-2); background: var(--card); }
.mh-chrow__link { flex: 1; display: flex; align-items: center; gap: 14px; min-width: 0; }
.mh-chrow__link:hover { color: inherit; }
.mh-chrow__thumb { position: relative; width: 66px; height: 66px; border-radius: 10px; overflow: hidden; flex: none; background: var(--soft); }
.mh-chrow__thumb img { width: 100%; height: 100%; object-fit: cover; }
.mh-chrow__lock { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .45); color: #fff; }
.mh-chrow__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mh-chrow__name { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; flex-wrap: wrap; }
.mh-chrow__ext { font-size: 12.5px; color: var(--fg-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mh-chrow__date { font-size: 12.5px; color: var(--muted); }
.mh-new { display: inline-flex; align-items: center; gap: 4px; }
.mh-chrow__side { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 15px; font-weight: 700; flex: none; }
.mh-chrow__likes { display: inline-flex; align-items: center; gap: 6px; }
.mh-chrow__read { display: none; color: var(--mh-green); }
.mh-chrow.is-read { opacity: .6; }
.mh-chrow.is-read .mh-chrow__read { display: inline-flex; }
.mh-chrow.is-current { border-color: color-mix(in srgb, var(--mh-primary) 50%, transparent); }
.mh-chrow.is-current::before { content: ""; position: absolute; inset-block: 10px; inset-inline-start: -1px; width: 3px; border-radius: 3px; background: var(--mh-primary); }
.mh-chrow.is-locked .mh-chrow__name { color: var(--mh-orange); }
.mh-chrow.is-unlocked .mh-chrow__lock { display: none; }
.mh-chrow.is-unlocked .mh-chrow__name { color: var(--mh-green); }
.mh-chrow__hooks:empty { display: none; }
.mh-chlist.is-reversed { flex-direction: column-reverse; }

.mh-prose { font-size: 15.5px; line-height: 1.9; color: var(--fg-2); }
.mh-prose a { color: var(--mh-primary); }
.mh-prose img { border-radius: var(--mh-radius); }
.mh-summary { padding: 18px; border-radius: var(--mh-radius-lg); background: color-mix(in srgb, var(--card) 88%, transparent); border: 1px solid var(--border); }
.mh-rate { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: var(--mh-radius); background: var(--card); border: 1px solid var(--border); }
.mh-rate__stars { display: flex; gap: 2px; direction: ltr; }
.mh-rate__stars button { color: var(--soft-2); transition: transform .15s, color .15s; }
.mh-rate__stars button:hover { transform: scale(1.15); }
.mh-rate__stars button.is-on .mh-icon { color: #facc15; fill: #facc15; }

/* reactions */
.mh-reactions { padding: 20px; border-radius: var(--mh-radius-lg); background: color-mix(in srgb, var(--card) 88%, transparent); border: 1px solid var(--border); text-align: center; margin-block: 8px; }
.mh-reactions__title { font-size: 15px; font-weight: 700; margin-block-end: 14px; color: var(--fg-2); }
.mh-reactions__list { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.mh-reaction { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 70px; padding: 10px 8px; border-radius: 14px; border: 1px solid transparent; transition: transform .15s, background .2s, border-color .2s; }
.mh-reaction:hover { background: var(--soft); transform: translateY(-2px); }
.mh-reaction__emoji { font-size: 34px; line-height: 1.1; transition: transform .2s; filter: saturate(1.1); }
.mh-reaction:hover .mh-reaction__emoji { transform: scale(1.12); }
.mh-reaction__count { font-weight: 700; font-size: 15px; }
.mh-reaction__label { font-size: 12px; color: var(--muted); }
.mh-reaction[aria-pressed="true"] { background: color-mix(in srgb, var(--mh-primary) 14%, transparent); border-color: color-mix(in srgb, var(--mh-primary) 45%, transparent); }
.mh-reaction.is-bump .mh-reaction__emoji { animation: mh-bump .4s; }
@keyframes mh-bump { 40% { transform: scale(1.35) rotate(-8deg); } }

/* ---------- Reader ---------- */
.mh-readpage { padding-block-start: 20px; }
.mh-chhead { display: flex; gap: 16px; align-items: center; padding: 16px; border-radius: var(--mh-radius-lg); background: linear-gradient(135deg, var(--card), var(--bg-2)); border: 1px solid var(--border); margin-block-end: 18px; }
.mh-chhead__cover { width: 92px; flex: none; aspect-ratio: 5 / 7; border-radius: 12px; overflow: hidden; }
.mh-chhead__cover img { width: 100%; height: 100%; object-fit: cover; }
.mh-chhead__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mh-chhead__manga { color: var(--muted); font-size: 13px; }
.mh-chhead__title { font-size: clamp(17px, 2.2vw, 22px); font-weight: 800; }
.mh-chhead__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; }

.mh-chnav { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-block: 14px; }
.mh-chnav__row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.mh-chnav__row .mh-btn { min-width: 108px; border-radius: 14px; }
.mh-chnav__report { width: min(320px, 100%); background: var(--soft-2); }
.mh-chselect { position: relative; width: min(320px, 100%); }
.mh-chselect__btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 8px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); font-weight: 600; }
.mh-chselect__panel { position: absolute; inset-inline: 0; inset-block-start: calc(100% + 6px); z-index: 40; background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; }
.mh-chnav--bottom .mh-chselect__panel { inset-block-start: auto; inset-block-end: calc(100% + 6px); }
.mh-chselect__search { width: 100%; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-2); padding-inline: 10px; outline: none; margin-block-end: 6px; }
.mh-chselect__list { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow: auto; }
.mh-chselect__list a { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.mh-chselect__list a:hover { background: var(--soft); color: inherit; }
.mh-chselect__list a.is-current { background: var(--mh-primary); color: #fff; }
.mh-chselect__list a.is-read { color: var(--muted); }
.mh-chselect__list li.mh-muted { padding: 10px; text-align: center; }

.mh-readbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 16px; background: var(--card); border: 1px solid var(--border); margin-block: 14px; }
.mh-readbar__settings { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; font-weight: 600; color: var(--fg-2); }
.mh-readbar__settings:hover { background: var(--soft); }
.mh-readbar__page { font-size: 13px; color: var(--muted); }

.mh-reader { --rd-width: 800px; --rd-imgw: 100%; --rd-gap: 0px; --rd-bright: 1; position: relative; padding-block: 8px; background: var(--rd-bg, #000); transition: background .3s; }
.mh-reader[data-bg="black"] { --rd-bg: #000; }
.mh-reader[data-bg="dark"] { --rd-bg: #18181b; }
.mh-reader[data-bg="paper"] { --rd-bg: #f3ead7; }
.mh-reader[data-bg="light"] { --rd-bg: #ffffff; }
.mh-reader__stage { max-width: var(--rd-width); margin-inline: auto; display: flex; flex-direction: column; align-items: center; gap: var(--rd-gap); filter: brightness(var(--rd-bright)); }
.mh-reader__stage .page-break { width: var(--rd-imgw); margin: 0 !important; padding: 0 !important; line-height: 0; position: relative; display: flex; justify-content: center; }
.mh-reader__stage .page-break img, .mh-reader__stage .page-break canvas { width: 100%; height: auto; display: block; user-select: none; -webkit-user-drag: none; }
.mh-reader__stage img[loading="lazy"]:not([src]), .mh-reader__stage .page-break img:not(.is-loaded) { min-height: 200px; background: linear-gradient(90deg, #111 25%, #1a1a1a 50%, #111 75%); background-size: 200% 100%; }
.mh-reader__stage .page-break img.is-loaded { min-height: 0; background: none; }
.mh-reader[data-fit="height"] .page-break img { width: auto; max-width: 100%; max-height: calc(100vh - 20px); margin-inline: auto; }
.mh-reader[data-fit="original"] .page-break img { width: auto; max-width: 100%; }
.mh-reader[data-fit="full"] .mh-reader__stage { max-width: 100%; }
.mh-reader[data-mode="single"] .page-break, .mh-reader[data-mode="double"] .page-break { display: none; }
.mh-reader[data-mode="single"] .page-break.is-shown, .mh-reader[data-mode="double"] .page-break.is-shown { display: flex; }
.mh-reader[data-mode="double"] .mh-reader__stage { flex-direction: row; flex-wrap: nowrap; justify-content: center; align-items: flex-start; max-width: min(100%, calc(var(--rd-width) * 1.6)); }
.mh-reader[data-mode="double"][data-dir="rtl"] .mh-reader__stage { flex-direction: row-reverse; }
[dir="rtl"] .mh-reader[data-mode="double"][data-dir="rtl"] .mh-reader__stage { flex-direction: row; }
[dir="rtl"] .mh-reader[data-mode="double"][data-dir="ltr"] .mh-reader__stage { flex-direction: row-reverse; }
.mh-reader[data-mode="double"] .page-break.is-shown { width: 50%; }
.mh-reader[data-mode="single"] .mh-reader__stage, .mh-reader[data-mode="double"] .mh-reader__stage { min-height: 60vh; cursor: pointer; }
.mh-reader__pager { position: sticky; inset-block-end: 14px; display: flex; align-items: center; justify-content: center; gap: 14px; margin-block-start: 10px; z-index: 5; }
.mh-reader__pager span { padding: 6px 14px; border-radius: 99px; background: var(--glass); backdrop-filter: blur(8px); font-weight: 700; font-size: 14px; }
.mh-reader__alt { padding: 30px 16px; max-width: 760px; margin-inline: auto; color: var(--fg); }
.mh-reader:fullscreen { overflow: auto; padding: 0; }
.chapter-type-text .mh-reader { background: transparent; }
.chapter-type-text .mh-reader__stage { filter: none; max-width: 760px; padding: 20px 16px; font-size: 18px; line-height: 2; align-items: stretch; color: var(--fg-2); }
.chapter-type-text .mh-reader__stage .text-left, .chapter-type-text .mh-reader__stage .text-right { text-align: start; }

.mh-readend { display: flex; flex-direction: column; gap: 16px; padding-block-start: 22px; }
.mh-nextcard { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px; border-radius: var(--mh-radius-lg); background: linear-gradient(135deg, color-mix(in srgb, var(--mh-primary) 22%, var(--card)), var(--card)); border: 1px solid color-mix(in srgb, var(--mh-primary) 35%, transparent); text-align: center; position: relative; }
.mh-nextcard strong { font-size: 19px; }
.mh-nextcard:hover { color: inherit; border-color: var(--mh-primary); }
.mh-nextcard__arrow { position: absolute; inset-inline-end: 22px; inset-block-start: 50%; transform: translateY(-50%); color: var(--mh-primary); }
.mh-nextcard--end { background: var(--card); border-color: var(--border); gap: 10px; }
.mh-thanks { align-self: center; display: inline-flex; align-items: center; gap: 10px; padding: 10px 22px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); font-weight: 600; transition: .2s; }
.mh-thanks:hover { border-color: #f43f5e; }
.mh-thanks b { color: var(--muted); font-weight: 600; }
.mh-thanks.is-on { border-color: #f43f5e; background: color-mix(in srgb, #f43f5e 14%, transparent); }
.mh-thanks.is-on .mh-icon { color: #f43f5e; fill: #f43f5e; animation: mh-bump .4s; }

/* reader settings sheet */
.mh-sheet { position: fixed; inset: 0; z-index: 150; }
.mh-sheet__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .4); animation: mh-fade .2s; }
.mh-sheet__panel { position: absolute; inset-block: 0; inset-inline-start: 0; width: min(440px, 100vw); overflow: auto; background: var(--bg-2); border-inline-end: 1px solid var(--border); padding: 18px 22px 30px; display: flex; flex-direction: column; gap: 14px; animation: mh-slide-in .28s var(--mh-ease); box-shadow: var(--shadow); }
[dir="rtl"] .mh-sheet__panel { animation-name: mh-slide-in-rtl; }
.mh-sheet__head { display: flex; align-items: center; justify-content: space-between; padding-block-end: 12px; border-block-end: 1px solid var(--border); margin-inline: -22px; padding-inline: 22px; }
.mh-sheet__head h3 { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.mh-sheet__badge { width: 38px; height: 38px; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--mh-primary) 20%, transparent); color: var(--mh-primary); }
.mh-sheet__reset { align-self: flex-start; font-size: 13px; }
.mh-sheet__group { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 16px; border: 1px solid var(--border); background: var(--card); }
.mh-sheet__group h4 { font-size: 13px; color: var(--muted); font-weight: 600; }
.mh-sheet__hint { font-size: 12px; margin: 0; }
.mh-seggrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 8px; }
.mh-seggrid button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 62px; padding: 8px; border-radius: 14px; background: var(--soft); font-size: 13px; font-weight: 600; color: var(--fg-2); transition: background .2s, color .2s, transform .15s; }
.mh-seggrid button:hover { background: var(--soft-2); }
.mh-seggrid button.is-active { background: var(--mh-primary); color: #fff; box-shadow: 0 8px 20px -10px var(--mh-primary); }
.mh-swatch { width: 16px; height: 16px; border-radius: 99px; background: var(--c); border: 2px solid rgba(255, 255, 255, .5); }
.mh-range { display: flex; flex-direction: column; gap: 10px; }
.mh-range__label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.mh-range__label output { margin-inline-start: auto; font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--soft-2); }
.mh-range input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 99px; background: linear-gradient(to var(--mh-range-dir, right), var(--mh-primary) var(--p, 50%), var(--soft-2) var(--p, 50%)); outline: none; }
[dir="rtl"] .mh-range input[type="range"] { --mh-range-dir: left; }
.mh-range input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 99px; background: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .4); cursor: pointer; }
.mh-range input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 99px; background: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .4); cursor: pointer; }
.mh-fab { position: fixed; z-index: 120; inset-block-end: 20px; inset-inline-end: 20px; width: 50px; height: 50px; border-radius: 99px; background: var(--mh-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow); }

/* ---------- Library page ---------- */
.mh-library { padding-block-start: 26px; display: flex; flex-direction: column; gap: 18px; }
.mh-library__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.mh-library__head .mh-muted { margin: 4px 0 0; }
.mh-library__tools { display: flex; gap: 8px; flex-wrap: wrap; }
.mh-library__tools .mh-chtools__search { min-width: 240px; }
.mh-library__tabs { background: var(--card); }
.mh-library__foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding-block-start: 10px; border-block-start: 1px solid var(--border); }
.mh-libgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 18px 14px; }
.mh-libcard { position: relative; min-width: 0; }
.mh-libcard.is-dragging { opacity: .4; }
.mh-libcard.is-drop { outline: 2px dashed var(--mh-primary); outline-offset: 4px; border-radius: var(--mh-radius); }
.mh-libcard__cover { position: relative; display: block; aspect-ratio: 5 / 7; border-radius: var(--mh-radius); overflow: hidden; background: var(--soft); }
.mh-libcard__cover img { width: 100%; height: 100%; object-fit: cover; }
.mh-libcard__status { position: absolute; inset-block-start: 8px; inset-inline-start: 8px; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; color: #fff; background: var(--c); }
.mh-libcard__fav { position: absolute; inset-block-start: 8px; inset-inline-end: 8px; color: #f43f5e; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.mh-libcard__fav .mh-icon { fill: currentColor; }
.mh-libcard__new { position: absolute; inset-block-end: 8px; inset-inline-start: 8px; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; color: #fff; background: var(--mh-primary); }
.mh-libcard__title { font-size: 14px; font-weight: 700; line-height: 1.4; margin-block: 8px 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mh-libcard__meta { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.mh-libcard__meta a { color: var(--fg-2); font-weight: 600; }
.mh-libcard__bar { height: 3px; background: var(--soft-2); border-radius: 9px; overflow: hidden; margin-block-start: 6px; }
.mh-libcard__bar span { display: block; height: 100%; background: var(--mh-primary); }
.mh-libcard__menu { position: absolute; inset-block-start: 6px; inset-inline-end: 6px; z-index: 3; }
.mh-libcard__menu > button { width: 30px; height: 30px; border-radius: 99px; background: rgba(0, 0, 0, .65); color: #fff; display: inline-flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.mh-libcard__menu .mh-menu { position: absolute; inset-block-start: 34px; inset-inline-end: 0; min-width: 200px; z-index: 30; }
.mh-libcard__grip { position: absolute; inset-block-end: 8px; inset-inline-end: 8px; width: 28px; height: 28px; border-radius: 8px; background: rgba(0, 0, 0, .65); color: #fff; display: none; align-items: center; justify-content: center; cursor: grab; }
.mh-libgrid.is-manual .mh-libcard__grip { display: inline-flex; }
.mh-libgrid.is-history { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* merge modal */
.mh-merge__summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-block-end: 14px; }
.mh-merge__summary div { padding: 10px; border-radius: 12px; background: var(--soft); text-align: center; }
.mh-merge__summary b { display: block; font-size: 20px; }
.mh-merge__summary span { font-size: 12px; color: var(--muted); }
.mh-merge__bulk { display: flex; flex-wrap: wrap; gap: 6px; margin-block-end: 10px; align-items: center; font-size: 13px; }
.mh-merge__list { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow: auto; padding-inline-end: 4px; }
.mh-mrow { display: grid; grid-template-columns: 48px 1fr; gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-2); }
.mh-mrow img { width: 48px; aspect-ratio: 5 / 7; object-fit: cover; border-radius: 8px; }
.mh-mrow__title { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mh-mrow__tag { font-size: 10.5px; padding: 1px 7px; border-radius: 6px; background: var(--soft-2); color: var(--muted); font-weight: 600; }
.mh-mrow__tag--new { background: color-mix(in srgb, var(--mh-green) 15%, transparent); color: var(--mh-green); }
.mh-mrow__tag--conflict { background: color-mix(in srgb, var(--mh-orange) 15%, transparent); color: var(--mh-orange); }
.mh-mrow__opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px; margin-block-start: 8px; }
.mh-mrow__opt { display: flex; gap: 8px; align-items: flex-start; padding: 8px; border-radius: 10px; border: 1px solid var(--border); font-size: 12px; cursor: pointer; background: var(--card); }
.mh-mrow__opt:has(input:checked) { border-color: var(--mh-primary); background: color-mix(in srgb, var(--mh-primary) 10%, transparent); }
.mh-mrow__opt input { accent-color: var(--mh-primary); margin-block-start: 2px; }
.mh-mrow__opt b { display: block; font-size: 12.5px; }
.mh-mrow__skip { font-size: 12px; margin-block-start: 6px; }

/* ---------- Browse ---------- */
.mh-browse { padding-block-start: 26px; display: flex; flex-direction: column; gap: 18px; }
.mh-browse__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.mh-browse__head .mh-muted { margin: 4px 0 0; }
.mh-filters { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: var(--mh-radius-lg); background: var(--card); border: 1px solid var(--border); }
.mh-filters__row { display: grid; grid-template-columns: 200px 200px 1fr; gap: 14px; align-items: start; }
.mh-filters__actions { display: flex; gap: 8px; }

/* ---------- Blog / pages ---------- */
.mh-blog, .mh-article { padding-block-start: 26px; }
.mh-article { max-width: 860px; }
.mh-article--wide { max-width: var(--mh-container); }
.mh-article__head { margin-block-end: 18px; display: flex; flex-direction: column; gap: 6px; }
.mh-article__img { border-radius: var(--mh-radius-lg); overflow: hidden; margin-block-end: 20px; }
.mh-blog__head { margin-block-end: 20px; }
.mh-postgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.mh-postcard { border-radius: var(--mh-radius-lg); background: var(--card); border: 1px solid var(--border); overflow: hidden; }
.mh-postcard__img img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.mh-postcard__body { padding: 16px; }
.mh-postcard__title { font-size: 17px; margin-block: 4px 8px; }
.mh-postcard p { color: var(--muted); font-size: 14px; margin: 0; }
.mh-404 { text-align: center; padding-block: 70px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.mh-404__code { font-size: 110px; font-weight: 800; line-height: 1; background: linear-gradient(180deg, var(--mh-primary), transparent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mh-404__actions { display: flex; gap: 8px; }

/* account */
.mh-account { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 22px; align-items: start; }
.mh-account__nav { padding: 14px; border-radius: var(--mh-radius-lg); background: var(--card); border: 1px solid var(--border); position: sticky; inset-block-start: calc(var(--mh-header-h) + 14px); }
.mh-account__user { display: flex; align-items: center; gap: 10px; padding-block-end: 12px; margin-block-end: 8px; border-block-end: 1px solid var(--border); }
.mh-account__user img { border-radius: 99px; }
.mh-account__user div { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.mh-account__user .mh-muted { overflow: hidden; text-overflow: ellipsis; }
.mh-account__nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; border: 0; }
.mh-account__nav li a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--fg-2); border: 0; }
.mh-account__nav li a:hover { background: var(--soft); }
.mh-account__nav li.active a { background: var(--mh-primary); color: #fff; }

/* ad slots */
.mh-ad { display: flex; justify-content: center; margin-block: 18px; overflow: hidden; }
.mh-ad:empty { display: none; }

/* skeleton */
.mh-skel { position: relative; overflow: hidden; background: var(--soft); border-radius: var(--mh-radius); }
.mh-skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .06), transparent); animation: mh-shimmer 1.4s infinite; }
.mh-spinner { width: 20px; height: 20px; border-radius: 99px; border: 2px solid var(--soft-2); border-block-start-color: var(--mh-primary); animation: mh-spin .7s linear infinite; display: inline-block; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
	.mh-manga__grid { grid-template-columns: 270px minmax(0, 1fr); }
	.mh-manga__related { grid-column: 1 / -1; position: static; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
	.mh-manga__related .mh-side-title { grid-column: 1 / -1; }
	.mh-lgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mh-trend { grid-auto-columns: calc((100% - 5 * 14px) / 6); }
}
@media (max-width: 1024px) {
	.mh-nav { display: none; }
	.mh-header__burger { display: inline-flex; }
	.mh-header__inner { gap: 8px; }
	.mh-hero { --slide-w: 84vw; }
	.mh-rank { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mh-filters__row { grid-template-columns: 1fr 1fr; }
	.mh-filters__row > .mh-field:last-child { grid-column: 1 / -1; }
	.mh-account { grid-template-columns: 1fr; }
	.mh-account__nav { position: static; }
	.mh-account__nav ul { flex-direction: row; overflow-x: auto; }
	.mh-account__nav li a { white-space: nowrap; }
}
@media (max-width: 820px) {
	.mh-manga__grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
	.mh-manga__side { display: contents; }
	.mh-manga__mhead { order: 1; display: flex; gap: 14px; align-items: flex-start; }
	.mh-manga__mhead img { width: 118px; aspect-ratio: 5 / 7; object-fit: cover; border-radius: var(--mh-radius); flex: none; box-shadow: 0 16px 30px -14px rgba(0, 0, 0, .8); }
	.mh-manga__mhead > div { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
	.mh-manga__mhead .mh-manga__title { font-size: 20px; }
	.mh-manga__mmeta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
	.mh-manga__cover, .mh-manga__head { display: none; }
	.mh-manga__actions { order: 2; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.mh-manga__side > .mh-notice { order: 3; }
	.mh-manga__main { order: 4; }
	.mh-manga__side > .mh-report-btn { order: 5; }
	.mh-manga__plugin-actions { order: 5; }
	.mh-stats { order: 6; }
	.mh-info { order: 7; }
	.mh-manga__props { order: 8; }
	.mh-manga__related { order: 9; }
	.mh-trend { grid-auto-columns: 132px; grid-template-rows: auto; }
	.mh-lgrid { grid-template-columns: 1fr; }
	.mh-hero__content { flex-direction: column; justify-content: center; gap: 14px; padding: 20px; }
	.mh-hero__cover { width: 112px; }
	.mh-hero__slide { height: 400px; }
	.mh-hero__nav { display: none; }
}
@media (max-width: 640px) {
	body { font-size: 14.5px; }
	.mh-hide-sm { display: none !important; }
	.mh-section { margin-block: 26px; }
	.mh-section__title { font-size: 18px; }
	.mh-rank { grid-template-columns: 1fr; }
	.mh-pgrid, .mh-libgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }
	.mh-pcard__title, .mh-libcard__title { font-size: 12.5px; }
	.mh-pcard .mh-chips { display: none; }
	.mh-tag { font-size: 9.5px; padding: 2px 6px; }
	.mh-chrow__thumb { width: 52px; height: 52px; }
	.mh-chrow__side { font-size: 13px; gap: 8px; }
	.mh-radio-grid { grid-template-columns: 1fr; }
	.mh-chhead__cover { width: 70px; }
	.mh-reactions__list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; }
	.mh-reaction { min-width: 0; padding: 8px 2px; }
	.mh-reaction__emoji { font-size: 26px; }
	.mh-reaction__label { font-size: 10.5px; }
	.mh-helpbar { flex-wrap: wrap; }
	.mh-helpbar__text { flex-basis: calc(100% - 60px); }
	.mh-helpbar .mh-report-btn { width: 100%; }
	.mh-filters__row { grid-template-columns: 1fr; }
	.mh-browse__head { align-items: center; }
	.mh-library__tools, .mh-library__tools .mh-chtools__search { width: 100%; min-width: 0; }
	.mh-merge__summary { grid-template-columns: repeat(3, 1fr); }
	.mh-sharebar__card { padding: 12px 14px; }
	.mh-manga__side { grid-template-columns: 120px 1fr; }
}
@media (max-width: 420px) {
	.mh-hide-xs { display: none !important; }
	.mh-pgrid, .mh-libgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mh-hero { --slide-w: 88vw; }
	.mh-hero__slide { height: 380px; }
	.mh-lcard { grid-template-columns: 40% 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
	.mh-header, .mh-footer, .mh-readbar, .mh-chnav, .mh-reactions { display: none !important; }
}
