/* Compact page system: consistent hierarchy, restrained surfaces, useful widths. */
:root { --mv-page:1320px; --mv-space:clamp(12px,1.7vw,22px); }
#root main:not([data-reader='true']) { padding-top:12px; }
#root main:not([data-reader='true']) > .mv-page { max-width:none; padding:0 0 16px; margin-inline:0; min-width:0; }
#root main:not([data-reader='true']) .mv-page h1 { font-size:24px; line-height:1.25; letter-spacing:-.035em; }
#root main:not([data-reader='true']) .mv-page h2 { font-size:16px; line-height:1.4; }
#root main:not([data-reader='true']) .mv-page h3 { font-size:13px; line-height:1.45; }
#root main .mv-page :where([class~='p-5'],[class~='p-6'],[class~='p-7'],[class~='p-8'],[class~='sm:p-5'],[class~='sm:p-6'],[class~='sm:p-7'],[class~='sm:p-8'],[class~='md:p-6']) { padding:14px; }
#root main .mv-page :where([class~='p-4'],[class~='sm:p-4']) { padding:12px; }
#root main .mv-page :where([class~='rounded-3xl'],[class~='sm:rounded-3xl']) { border-radius:10px; }
#root main .mv-page :where([class~='rounded-2xl'],[class~='sm:rounded-2xl']) { border-radius:8px; }
#root main .mv-page :where([class~='shadow-xl'],[class~='shadow-2xl'],[class~='shadow-lg'],[class~='shadow-md']) { box-shadow:0 2px 7px #1f193a08; }
#root main .mv-page :where([class~='gap-5'],[class~='gap-6'],[class~='gap-8'],[class~='sm:gap-6'],[class~='lg:gap-6']) { gap:14px; }
#root main .mv-page :where([class~='space-y-5'],[class~='space-y-6'],[class~='space-y-8'],[class~='sm:space-y-5'],[class~='sm:space-y-6'],[class~='sm:space-y-8']) > :not([hidden]) ~ :not([hidden]) { margin-top:12px; margin-bottom:0; }
#root main .mv-page.mv-page-heading { padding:0; }
#root main .mv-page-heading:not(.mv-profile-overview) { padding:2px 0 12px; border-width:0 0 1px; border-radius:0; background:transparent; box-shadow:none; backdrop-filter:none; }
#root main .mv-page-heading:not(.mv-profile-overview) > .absolute { display:none; }
#root main .mv-page-heading > p { margin-top:5px; }
#root main .mv-page :where(button):not([role='switch']) { min-height:30px; border-radius:6px; }
#root main .mv-page :where(input:not([type='checkbox']):not([type='radio']):not([type='range']),select) { min-height:32px; border-radius:6px; font-size:12px; }
#root main .mv-page :where(textarea) { border-radius:6px; font-size:12px; line-height:1.6; }
#root main .mv-page :where([class~='animate-pulse']) { animation:none; }
#root main .mv-page :where(.hover-lift:hover) { transform:none; }
#root main .mv-page-about,#root main .mv-page-terms,#root main .mv-page-privacy { max-width:960px; margin-inline:auto; }
#root main .mv-page-auth { padding-top:18px; padding-bottom:24px; }
#root main .mv-page-about > div:first-child { text-align:left; }
#root main .mv-page-about > div:first-child > svg { width:32px; height:32px; margin:0; }
#root main .mv-preview-notice { padding:6px 10px; margin-bottom:10px; border-radius:6px; font-size:10px; }
/* Discovery and community overviews: governed by modern subtle styling in moonverse-modern-subtle.css */
#root main .mv-page-achievements > .mv-page-heading { align-items:center; }
#root main .mv-page-achievements > .mv-page-heading > .absolute { display:none; }
#root main .mv-page-achievements > .grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,330px),1fr)); }
#root main .mv-page-achievements > .grid > div { padding:12px; gap:8px; }
#root main .mv-page-shop > .grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); gap:10px; }
#root main .mv-page-shop > .grid > div { padding:12px; }
#root main .mv-page-membership > .mv-page-heading { padding-bottom:12px; }
/* Settings: stable navigation beside compact forms on wider screens. */
.mv-settings-workspace { display:grid; grid-template-columns:170px minmax(0,1fr); gap:20px; align-items:start; }
#root main .mv-settings-nav { position:sticky; top:65px; display:flex; flex-direction:column; align-items:stretch; gap:3px; border:0; padding:0; overflow:visible; }
#root main .mv-settings-nav button { justify-content:flex-start; text-align:left; padding:8px 10px; font-size:11px; }
.mv-settings-content { min-width:0; display:flex; flex-direction:column; gap:10px; }
.mv-settings-content > * { margin-block:0!important; }
#root main .mv-settings-content :where([class~='space-y-4'],[class~='space-y-5']) > :not([hidden]) ~ :not([hidden]) { margin-top:10px; }
#root main .mv-settings-content label { font-size:11px; }
/* Profile: shorten the ornamental banner and keep facts close to the identity. */
#root main .mv-profile-overview > div:first-child { height:65px; }
#root main .mv-profile-overview > div:nth-child(2) { margin-top:-20px; padding:0 14px 12px; gap:12px; }
#root main .mv-profile-stats { gap:0; padding:0; border:1px solid var(--border); border-radius:8px; background:var(--card); overflow:hidden; }
#root main .mv-profile-stats > div { padding:9px 12px; border:0; border-radius:0; border-right:1px solid var(--border); box-shadow:none; background:transparent; }
#root main .mv-profile-stats > div:last-child { border-right:0; }
#root main .mv-profile-stats > div > svg { display:none; }
#root main .mv-profile-stats > div > :last-child { font-size:9px; margin-top:3px; }
#root main .mv-profile-columns { grid-template-columns:minmax(240px,.8fr) minmax(0,2fr); gap:16px; }
#root main .mv-profile-columns > div { grid-column:auto; min-width:0; }
#root main .mv-page-profile [class*='aspect-[2/3]'] { aspect-ratio:3/4; max-height:170px; }
/* Leaderboard: accurate ranked rows replace oversized podium cards. */
.mv-page-leaderboard { display:flex; flex-direction:column; gap:12px; }
.mv-rank-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; padding-bottom:12px; border-bottom:1px solid var(--border); }
.mv-rank-heading h1 { margin:0; }
.mv-rank-heading p { margin-top:5px; font-size:12px; color:var(--muted-foreground); }
.mv-rank-heading > span { font-size:10px; color:var(--muted-foreground); padding-top:8px; white-space:nowrap; }
.mv-rank-filters { display:flex; gap:5px; }
.mv-rank-filters button { padding:5px 11px; font-size:11px; background:var(--card); color:var(--muted-foreground); border:1px solid var(--border); cursor:pointer; }
.mv-rank-filters button[aria-pressed='true'] { background:var(--primary); border-color:var(--primary); color:var(--primary-foreground); }
.mv-rank-table { border:1px solid var(--border); border-radius:8px; overflow:hidden; background:var(--card); }
.mv-rank-table-head,.mv-rank-row { display:grid; grid-template-columns:46px minmax(0,1fr) 130px; gap:12px; align-items:center; padding:11px 16px; }
.mv-rank-table-head { color:var(--muted-foreground); background:var(--muted); font-size:10px; }
.mv-rank-table-head > :last-child { text-align:right; }
.mv-rank-row { border-top:1px solid var(--border); }
.mv-rank-number { font-size:14px; font-weight:650; color:var(--muted-foreground); }
.is-top .mv-rank-number { color:var(--primary); }
.mv-rank-reader { display:flex; align-items:center; gap:10px; min-width:0; }
.mv-rank-reader > img { width:34px; height:34px; border-radius:50%; object-fit:cover; }
/* B25: monogram behind the avatar photo; shows through when the image fails. */
.mv-rank-avatar { position:relative; width:34px; height:34px; flex:none; }
.mv-rank-initial { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; border-radius:50%; background:linear-gradient(135deg, rgba(129,140,248,.22), rgba(56,189,248,.14)); border:1px solid var(--border); color:var(--primary); font-size:14px; font-weight:700; }
.mv-rank-avatar img { position:absolute; inset:0; width:34px; height:34px; border-radius:50%; object-fit:cover; }
.mv-rank-reader > div { min-width:0; }
.mv-rank-name { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.mv-rank-name strong { font-size:12px; }
.mv-rank-name span,.mv-rank-badge { color:var(--muted-foreground); font-size:9px; }
.mv-rank-reader p { font-size:10px; color:var(--muted-foreground); margin:2px 0; }
.mv-rank-badge { color:var(--primary); }
.mv-rank-score { display:flex; flex-direction:column; align-items:flex-end; gap:3px; }
.mv-rank-score strong { font-size:13px; }
.mv-rank-score span { color:var(--muted-foreground); font-size:9px; }
/* Story cover spacing and alignment. */
.mv-series-intro { grid-template-columns:76px minmax(0,1fr); column-gap:14px; row-gap:8px; padding-top:3px; padding-bottom:10px; }
main button.mv-series-cover { display:block; width:76px; height:108px; min-height:108px; margin-top:2px; padding:0; border-radius:5px; box-shadow:none; }
.mv-series-cover img { display:block; object-position:center; }
.mv-series-identity { gap:5px; }
/* Purposeful, labeled chapter tools and flat list rows. */
.mv-chapter-tools { display:flex; flex-direction:column; gap:7px; margin-bottom:8px; }
.mv-chapter-tools-primary { display:flex; align-items:center; gap:10px; }
.mv-chapter-filters { display:flex; gap:3px; }
main .mv-chapter-filters button { min-height:29px; padding:4px 8px; font-size:10px; color:var(--muted-foreground); background:var(--muted); border:1px solid transparent; cursor:pointer; display:flex; gap:5px; align-items:center; }
.mv-chapter-filters button > span { font-size:9px; opacity:.75; }
main .mv-chapter-filters button[aria-pressed='true'] { background:var(--primary); color:var(--primary-foreground); }
.mv-chapter-search { min-width:0; flex:1; position:relative; }
main .mv-chapter-search input { width:100%; height:30px; min-height:30px!important; padding:5px 30px 5px 9px; border:1px solid var(--border); border-radius:5px; background:var(--card); font-size:11px!important; }
main .mv-chapter-search button { position:absolute; right:3px; top:3px; padding:0; width:24px; min-height:24px!important; height:24px; color:var(--muted-foreground); font-size:16px; }
.mv-chapter-tools-secondary { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
main .mv-chapter-tools-secondary select { min-height:29px!important; height:29px; font-size:10px!important; max-width:190px; border:1px solid var(--border); border-radius:5px; background:var(--card); color:var(--foreground); padding:3px 24px 3px 8px; }
main .mv-chapter-expand { font-size:10px; min-height:29px!important; padding:3px 7px; background:var(--muted); color:var(--muted-foreground); border:1px solid var(--border); cursor:pointer; }
.mv-chapter-jump { display:flex; margin-left:auto; height:29px; border:1px solid var(--border); border-radius:5px; overflow:hidden; }
main .mv-chapter-jump input { width:61px; min-height:0!important; height:27px; padding:2px 5px; font-size:10px!important; background:var(--card); border:0; }
main .mv-chapter-jump button { padding:0 7px; min-height:27px!important; font-size:10px; background:var(--muted); color:var(--primary); border-left:1px solid var(--border); }
.mv-chapter-jump button:disabled { opacity:.4; }
.mv-series-panel .mv-story-chapters > * + * { margin-top:7px!important; }
.mv-series-panel .mv-story-chapters [id^='chapter-'] { border-radius:0; }
.mv-series-panel .mv-story-chapters [id^='chapter-'] > a > div,.mv-series-panel .mv-story-chapters [id^='chapter-'] > button > div { border-radius:4px; min-height:33px; padding:5px 8px; }
/* Discussion: compact composer, shared metadata, separated threads. */
.mv-series-discussion > section { display:flex; flex-direction:column; gap:10px; }
.mv-series-discussion > section > * { margin-block:0!important; }
.mv-series-discussion > section > div:first-child { padding-bottom:7px; gap:8px; }
.mv-series-discussion .mv-comment-composer { padding:9px; border-radius:6px; background:var(--card); }
.mv-series-discussion .mv-comment-composer textarea { min-height:60px; height:60px; padding:7px 8px; resize:vertical; }
.mv-series-discussion :where(form) { font-size:11px; }
.mv-series-discussion :where(button) { font-size:11px; }
.mv-series-discussion .mv-comment,.mv-series-discussion .mv-review { border-width:0 0 1px; border-radius:0; background:transparent; padding:11px 0; box-shadow:none; }
.mv-series-discussion .mv-comment > div:first-child { gap:9px; align-items:flex-start; }
.mv-series-discussion .mv-comment > div:first-child > div { display:flex; align-items:center; flex-wrap:wrap; gap:4px 7px; }
.mv-series-discussion .mv-comment > p,.mv-series-discussion .mv-review > p { font-size:12px; line-height:1.65; }
.mv-series-discussion .mv-comment > * + *,.mv-series-discussion .mv-review > * + * { margin-top:5px; }
.mv-series-discussion .mv-comment > div:first-child > button { min-width:37px; min-height:26px!important; background:var(--muted); border-radius:5px; justify-content:center; padding:3px 5px; flex-shrink:0; }
.mv-series-discussion .mv-comment > div:has(> button) { padding-top:0; }
.mv-series-discussion .mv-comment-reply { padding:7px 0 7px 9px; border:0; border-radius:0; background:transparent; }
.mv-series-discussion .mv-comment-reply > div { display:flex; flex-wrap:wrap; gap:4px 12px; }
.mv-series-discussion .mv-review-summary { display:grid; grid-template-columns:180px minmax(0,1fr); align-items:center; gap:14px; padding:10px; border-radius:6px; background:var(--muted); }
.mv-series-discussion .mv-review-summary > div:first-child { padding:0; border:0; }
.mv-series-discussion .mv-review-summary > div:last-child { margin:0; }
.mv-series-discussion .mv-review-summary .text-3xl,.mv-series-discussion .mv-review-summary .sm\:text-3xl { font-size:24px; }
.mv-series-discussion .mv-review > div:first-child { flex-wrap:wrap; gap:5px 12px; }
.mv-series-discussion .mv-review > h5 { font-size:12px; }
main .mv-spoiler-reveal { width:100%; min-height:30px; padding:6px 9px; }
/* Reading notes: clear rows, two-column profiles, and no nested panels. */
.mv-story-notes > summary { min-height:32px; display:list-item; font-size:12px; }
.mv-notes-body { display:flex; flex-direction:column; gap:12px; margin-top:7px!important; }
.mv-notes-body :where(h3,p,figure,blockquote,dl,dd) { margin:0; }
.mv-note-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:7px; }
.mv-note-heading h3,.mv-notes-themes h3,.mv-note-reading h3 { font-size:11px; font-weight:650; }
.mv-note-heading > span { color:var(--muted-foreground); font-size:10px; }
.mv-notes-pair > dl { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.mv-notes-pair > dl > div { min-width:0; padding-left:9px; border-left:2px solid color-mix(in srgb,var(--primary) 25%,var(--border)); }
.mv-notes-pair dt { font-size:10px; color:var(--primary); font-weight:650; margin-bottom:4px; }
.mv-notes-pair dd { font-size:12px; line-height:1.6; }
.mv-note-tags { display:flex; flex-wrap:wrap; gap:4px 8px; margin-top:5px; }
.mv-note-tags a { color:var(--primary); font-size:10px; line-height:1.6; }
.mv-note-tags a:hover { text-decoration:underline; }
.mv-notes-themes { border-block:1px solid var(--border); padding:8px 0; display:flex; flex-direction:column; gap:7px; }
.mv-notes-themes > div { display:grid; grid-template-columns:100px minmax(0,1fr); gap:10px; align-items:baseline; }
.mv-notes-themes .mv-note-tags { margin:0; }
.mv-notes-reading { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
main .mv-note-heading button { min-height:24px!important; font-size:10px; padding:1px 6px; color:var(--primary); background:var(--muted); border-radius:4px; }
.mv-note-quote blockquote { font-size:12px; line-height:1.65; font-style:italic; border-left:2px solid var(--border); padding-left:9px; }
.mv-note-quote figcaption { font-size:10px; color:var(--primary); margin-top:6px; }
.mv-note-quote figcaption span { display:block; color:var(--muted-foreground); font-size:9px; margin-top:2px; }
.mv-note-reading ul { padding-left:15px; margin:7px 0 0; font-size:11px; line-height:1.65; }
.mv-note-reading li + li { margin-top:4px; }
/* Menus and native dropdowns share a compact, readable surface. */
.mv-popover { border-radius:7px!important; padding:4px!important; box-shadow:0 6px 20px #16112920!important; max-height:min(420px,65dvh); overflow-y:auto; }
.mv-series .mv-popover { width:210px; }
.mv-popover [role='menuitem'] { min-height:32px!important; border-radius:4px!important; padding:5px 7px!important; font-size:11px!important; }
.mv-popover [role='menuitem'] > div > div:last-child > span:nth-child(2) { display:none; }
.mv-popover > div:first-child { font-size:9px; padding:5px 7px; }
main:not([data-reader='true']) select { color-scheme:inherit; }
main:not([data-reader='true']) select option { font-size:12px; background:var(--card); color:var(--foreground); }
@media(min-width:1200px) {
 .mv-chapter-tools { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:center; }
 .mv-chapter-tools-secondary { flex-wrap:nowrap; }
 .mv-chapter-tools:has(select[aria-label='Filter by volume']) { display:flex; }
}
@media(max-width:899px) {
 .mv-settings-workspace { display:flex; flex-direction:column; gap:12px; }
 #root main .mv-settings-nav { position:static; width:100%; flex-direction:row; align-items:center; overflow-x:auto; padding-bottom:4px; }
 #root main .mv-settings-nav button { white-space:nowrap; flex-shrink:0; }
 .mv-settings-content { width:100%; }
 .mv-series-discussion .mv-review-summary { grid-template-columns:minmax(0,1fr); gap:8px; }
 .mv-series-discussion .mv-review-summary > div:last-child { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media(max-width:759px) {
 #root main:not([data-reader='true']) .mv-page h1 { font-size:21px; }
 #root main .mv-page-heading:not(.mv-profile-overview) { padding-bottom:10px; }
 .mv-series-intro { grid-template-columns:60px minmax(0,1fr); column-gap:11px; padding-top:2px; row-gap:8px; }
 main button.mv-series-cover { width:60px; height:86px; min-height:86px; margin-top:1px; }
 .mv-series .mv-story-actions { margin-left:-71px!important; padding-top:5px; }
 .mv-rank-heading { flex-direction:column; gap:5px; }
 .mv-rank-heading > span { padding:0; }
 .mv-rank-table-head,.mv-rank-row { grid-template-columns:28px minmax(0,1fr) 70px; gap:8px; padding:10px; }
 .mv-rank-reader { gap:8px; }
 .mv-rank-reader > img { width:28px; height:28px; }
 .mv-rank-avatar, .mv-rank-avatar img { width:28px; height:28px; }
 .mv-rank-initial { font-size:12px; }
 .mv-rank-name { gap:4px 7px; }
 .mv-rank-name strong { font-size:11px; }
 .mv-rank-reader p { font-size:9px; }
 .mv-rank-badge { display:none; }
 .mv-rank-score strong { font-size:12px; }
 .mv-rank-table-head { font-size:9px; }
 .mv-notes-reading { gap:14px; }
 #root main .mv-page-shop > .grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:479px) {
 .mv-chapter-tools-primary { flex-wrap:wrap; gap:6px; }
 .mv-chapter-search { flex:1 1 100%; }
 .mv-chapter-filters { width:100%; }
 main .mv-chapter-filters button { flex:1; justify-content:center; }
 .mv-chapter-tools-secondary { gap:5px; }
 main .mv-chapter-tools-secondary select { max-width:135px; }
 .mv-chapter-jump { margin-left:0; }
 .mv-notes-pair > dl,.mv-notes-reading { grid-template-columns:minmax(0,1fr); gap:12px; }
 .mv-notes-themes > div { grid-template-columns:78px minmax(0,1fr); }
 #root main .mv-page-shop > .grid { grid-template-columns:minmax(0,1fr); }
 #root main .mv-profile-overview > div:nth-child(2) { margin-top:-14px; align-items:flex-start; }
 .mv-series-discussion .mv-comment > p,.mv-series-discussion .mv-review > p { font-size:11px; }
}
@media(pointer:coarse) {
 #root main .mv-page :where(button):not([role='switch']),.mv-popover [role='menuitem'],main .mv-chapter-filters button { min-height:34px!important; }
 main .mv-chapter-tools-secondary select,main .mv-chapter-search input { min-height:34px!important; height:34px; }
}
.mv-rank-heading h1 { font-weight:750; }
main .mv-series-discussion button[aria-label^='Rate '] { min-width:28px; min-height:28px!important; border-radius:4px; }
main .mv-series-discussion button[aria-label^='Rate '][aria-pressed='true'] { background:color-mix(in srgb,var(--primary) 10%,transparent); }
@media(max-width:479px) {
 .mv-chapter-tools-secondary { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) 80px; }
 main .mv-chapter-tools-secondary select { width:100%; min-width:0; max-width:none; }
 .mv-chapter-jump { width:80px; }
 main .mv-chapter-jump input { min-width:0; width:50px; }
}
