/* ── Controls: corner roundness (UI_ROUND, plugins/settings.php) ─────────────────────────────────────────────────
   Linked only when a site's level is not 2 (the site as designed); <html data-ui-round="n"> carries the level. The level
   sets radius tokens, and the rules below hand those tokens to the site's CONTROLS: buttons, inputs, selects, links
   styled as buttons, tabs, menu options, segmented groups, toggle switches (track and knob), text pills and badges, and
   the dropdown panels that hold options — Tailwind-classed ones by their rounded-* class (so a button keeps its size
   relation to a dropdown), hand-styled ones by name. Cards, covers, posters and content panels follow a gentler scale of
   their own further down; avatars, status dots and colour swatches are left round on purpose.
     sm  — Tailwind `rounded`        (.25rem)     chips, tiny tabs
     md  — `rounded-md`              (.375rem)    segmented options
     lg  — `rounded-lg`              (.5rem)      the standard button / input
     xl  — `rounded-xl`              (.75rem)     large buttons, CTAs
     2xl — `rounded-2xl`             (1rem)
     full — `rounded-full`           (9999px)     pills, round icon buttons
     panel — dropdown menus / popovers (kept sane at the pill level: a menu must not turn into an ellipse)
     card  — the few framed bars that read as controls' housing: the community bar's cards and the floating header panel */
html[data-ui-round="0"] { --ui-r-sm: 0px;    --ui-r-md: 0px;    --ui-r-lg: 0px;    --ui-r-xl: 0px;    --ui-r-2xl: 0px;    --ui-r-full: 2px;    --ui-r-panel: 0px; --ui-r-card: 0px;  }
html[data-ui-round="1"] { --ui-r-sm: 2px;    --ui-r-md: 3px;    --ui-r-lg: 4px;    --ui-r-xl: 6px;    --ui-r-2xl: 8px;    --ui-r-full: 6px;    --ui-r-panel: 6px; --ui-r-card: 8px;  }
html[data-ui-round="2"] { --ui-r-sm: .25rem; --ui-r-md: .375rem; --ui-r-lg: .5rem; --ui-r-xl: .75rem; --ui-r-2xl: 1rem;  --ui-r-full: 9999px; --ui-r-panel: .75rem; --ui-r-card: 1rem; }
html[data-ui-round="3"] { --ui-r-sm: 6px;    --ui-r-md: 8px;    --ui-r-lg: 12px;   --ui-r-xl: 16px;   --ui-r-2xl: 20px;   --ui-r-full: 9999px; --ui-r-panel: 16px; --ui-r-card: 1.25rem; }
html[data-ui-round="4"] { --ui-r-sm: 9999px; --ui-r-md: 9999px; --ui-r-lg: 9999px; --ui-r-xl: 9999px; --ui-r-2xl: 9999px; --ui-r-full: 9999px; --ui-r-panel: 20px; --ui-r-card: 1.5rem; }

/* ── Covers and cards: their own scale (--ui-rc-*), rounder with the level but never a pill — a cover with a 9999px
   radius is an oval. Default (2) matches Tailwind's rounded / -md / -lg / -xl / -2xl. ── */
html[data-ui-round="0"] { --ui-rc-sm: 0px;    --ui-rc-md: 0px;     --ui-rc-lg: 0px;   --ui-rc-xl: 0px;    --ui-rc-2xl: 0px;  }
html[data-ui-round="1"] { --ui-rc-sm: 2px;    --ui-rc-md: 3px;     --ui-rc-lg: 4px;   --ui-rc-xl: 6px;    --ui-rc-2xl: 8px;  }
html[data-ui-round="2"] { --ui-rc-sm: .25rem; --ui-rc-md: .375rem; --ui-rc-lg: .5rem; --ui-rc-xl: .75rem; --ui-rc-2xl: 1rem; }
html[data-ui-round="3"] { --ui-rc-sm: 6px;    --ui-rc-md: 8px;     --ui-rc-lg: 12px;  --ui-rc-xl: 16px;   --ui-rc-2xl: 20px; }
html[data-ui-round="4"] { --ui-rc-sm: 8px;    --ui-rc-md: 10px;    --ui-rc-lg: 16px;  --ui-rc-xl: 22px;   --ui-rc-2xl: 28px; }

/* ── Tailwind-classed controls (by element, then by their radius class) ── */
html[data-ui-round] :is(button, input, select, textarea, summary, [role="button"], [role="tab"], [role="menuitem"], [role="menuitemradio"], [role="option"], [role="group"], a).rounded      { border-radius: var(--ui-r-sm); }
html[data-ui-round] :is(button, input, select, textarea, summary, [role="button"], [role="tab"], [role="menuitem"], [role="menuitemradio"], [role="option"], [role="group"], a).rounded-md   { border-radius: var(--ui-r-md); }
html[data-ui-round] :is(button, input, select, textarea, summary, [role="button"], [role="tab"], [role="menuitem"], [role="menuitemradio"], [role="option"], [role="group"], a).rounded-lg   { border-radius: var(--ui-r-lg); }
html[data-ui-round] :is(button, input, select, textarea, summary, [role="button"], [role="tab"], [role="menuitem"], [role="menuitemradio"], [role="option"], [role="group"]).rounded-xl      { border-radius: var(--ui-r-xl); }   /* not a.rounded-xl: those are cards */
html[data-ui-round] :is(button, input, select, textarea, summary, [role="button"], [role="tab"], [role="menuitem"], [role="menuitemradio"], [role="option"], [role="group"]).rounded-2xl     { border-radius: var(--ui-r-2xl); }
html[data-ui-round] :is(button, input, select, textarea, summary, [role="button"], [role="tab"], [role="menuitem"], [role="menuitemradio"], [role="option"], [role="group"], a).rounded-full { border-radius: var(--ui-r-full); }
/* multi-line text boxes never go full pill — a lozenge-shaped textarea reads badly — so their corner is capped */
html[data-ui-round] textarea[class].rounded-lg, html[data-ui-round] #cb-report-panel .cbr-box { border-radius: min(var(--ui-r-lg), 1.25rem); } /* [class] lifts these over the control rule's :is([role=…]) specificity */
html[data-ui-round] textarea[class].rounded-xl { border-radius: min(var(--ui-r-xl), 1.25rem); }
/* the report dialog (its rules are id-scoped; the Details box is with the text areas above): the topic rows, their icon
   tiles, the × and the tile beside the title take the standard control corner, like the reading-list dialog's rows;
   Cancel / Send take the large-button corner (.75rem as designed), like the other dialogs' buttons (Bulk Unlock, the
   locked-chapter dialog, the Buy Coins CTA); the error note is capped like a text box, the key hints sit on the small corner */
html[data-ui-round] #cb-report-panel .cbr-opt, html[data-ui-round] #cb-report-panel .cbr-opt-ico,
html[data-ui-round] #cb-report-panel .cbr-x, html[data-ui-round] #cb-report-panel .cbr-tile { border-radius: var(--ui-r-lg); }
html[data-ui-round] #cb-report-panel .cbr-cancel, html[data-ui-round] #cb-report-panel .cbr-submit { border-radius: var(--ui-r-xl); }
html[data-ui-round] #cb-report-panel .cbr-error { border-radius: min(var(--ui-r-lg), 1.25rem); }
html[data-ui-round] #cb-report-panel .cbr-keys kbd { border-radius: var(--ui-r-sm); }
html[data-ui-round] #cb-report-panel .cbr-note { border-radius: var(--ui-rc-xl); } /* the notice and its ×: as the series page's discussion note */
html[data-ui-round] #cb-report-panel .cbr-note-x { border-radius: var(--ui-r-md); }
/* the dialog itself sits on the card scale like the other dialogs; its frame is written inline by its script (a sheet
   below 768px: top corners only), hence the !important */
html[data-ui-round] #cb-report-panel { border-radius: var(--ui-rc-2xl) var(--ui-rc-2xl) 0 0 !important; }
@media (min-width: 768px) { html[data-ui-round] #cb-report-panel { border-radius: var(--ui-rc-2xl) !important; } }
/* the series page's Start / Continue, Download and Bookmark row: pills on phones, rounded-xl from sm (the skeleton too) */
@media (min-width: 640px) {
    /* [role="button"] is in the list only to lift this rule to the specificity of the rounded-full rule above, which it must beat */
    html[data-ui-round] :is(button, a, div, [role="button"]).sm\:rounded-xl { border-radius: var(--ui-r-xl); }
}

/* ── Dropdown panels and menus (the panel token) ── */
html[data-ui-round] .theme-menu,
html[data-ui-round] #nav-search-popover,
html[data-ui-round] #download-dropdown,
html[data-ui-round] [id$="-dropdown"].rounded-xl,
html[data-ui-round] [id$="-popover"].rounded-xl { border-radius: var(--ui-r-panel); }
html[data-ui-round] .theme-opt { border-radius: var(--ui-r-lg); }
/* the header's sheet-or-dropdown menus — the user menu, the notifications menu and the Home sections panel — get their
   radius inline from their scripts (a 20px-topped sheet on phones, a 16px dropdown from md), hence the !important */
html[data-ui-round] #home-sections-panel, html[data-ui-round] #user-menu, html[data-ui-round] #notif-menu { border-radius: var(--ui-r-card) var(--ui-r-card) 0 0 !important; }
@media (min-width: 768px) {
    html[data-ui-round] #home-sections-panel, html[data-ui-round] #user-menu, html[data-ui-round] #notif-menu { border-radius: var(--ui-r-panel) !important; }
}
/* icon tiles — the small squares beside the user menu's items and in the header / download / bookmark menus: spans
   (flex items-center justify-center w-8 h-8 rounded-lg …), so the element rules above miss them */
html[data-ui-round] span.flex.rounded-lg { border-radius: var(--ui-r-lg); }
html[data-ui-round] span.flex.rounded-md { border-radius: var(--ui-r-md); }
/* the Home sections switches: track and knob share the pill token (2px at level 0: a squared switch) */
html[data-ui-round] .home-sec-switch, html[data-ui-round] .home-sec-switch::after { border-radius: var(--ui-r-full); }
/* the other toggle switches — Edit Profile's "Show reading list", the tier list's Public / Private, the reader settings'
   rows: the tracks that are buttons follow by the rule above, their knobs are spans, the tier list's track is a span too */
html[data-ui-round] #edit-profile-showcase-knob, html[data-ui-round] .tl-public-track, html[data-ui-round] .tl-public-knob,
html[data-ui-round] .rd-switch, html[data-ui-round] .rd-switch-knob { border-radius: var(--ui-r-full); }

/* ── Pills and badges: a span / div with text padding and rounded-full — the profile header's orbs / coins / level / streak
   pills, review tag pills, count badges, the header's coins pill, the cards' type badges, the sign-in page's feature pills … —
   follows the pill token like the buttons and links beside it. Unpadded circles (avatars, status dots, progress rings,
   colour swatches) stay round. ── */
html[data-ui-round] :is(span, div).rounded-full[class*="px-"] { border-radius: var(--ui-r-full); }
html[data-ui-round] div.rounded-full[class*="h-7 w-"] { border-radius: var(--ui-r-full); }   /* the review tag skeletons */
html[data-ui-round] #mobile-tabbar .tab-badge { border-radius: var(--ui-r-full); }          /* the phone tab bar's count badge */
html[data-ui-round] .xp-tip { border-radius: var(--ui-r-panel); }                            /* the level pill's hover card */

/* ── Hand-styled controls: header designs ── */
html[data-ui-round] #site-nav[data-header] .hdr-link { border-radius: var(--ui-r-lg); }
html[data-ui-round] #site-nav[data-header] #nav-search-input { border-radius: var(--ui-r-lg); }
html[data-ui-round] .hdr-kbd { border-radius: var(--ui-r-sm); }
html[data-ui-round] #site-nav[data-header="2"] #nav-search-input,
html[data-ui-round] #site-nav[data-header="5"] #nav-search-input,
html[data-ui-round] #site-nav[data-header="6"] #nav-search-input { border-radius: var(--ui-r-full); }   /* those designs draw the search as a pill */

/* ── Hand-styled controls: home sliders ── */
html[data-ui-round] .slider3-ctl, html[data-ui-round] .slider5-nav, html[data-ui-round] .slider8-nav,
html[data-ui-round] .slider6-pager, html[data-ui-round] .slider6-pager-btn, html[data-ui-round] .slider6-meta, html[data-ui-round] .slider3-pill { border-radius: var(--ui-r-full); }
html[data-ui-round] .ec-hide { border-radius: var(--ui-r-lg); } /* the Featured designs' header × ‹ › carry the poster rows' classes (button.rounded-lg above) */
html[data-ui-round] .slider3-cta { border-radius: var(--ui-r-xl); }
html[data-ui-round] .slider5-chip { border-radius: var(--ui-r-md); }
/* the one pill of three in design 2 keeps its inner dividers straight; only the outer corners follow */

/* ── Hand-styled controls: series page ── */
html[data-ui-round] .disc-switch { border-radius: var(--ui-r-lg); }
html[data-ui-round] .disc-tab { border-radius: var(--ui-r-md); }
html[data-ui-round] .disc-note .disc-note-close { border-radius: var(--ui-r-md); }
html[data-ui-round] .series-l4 .l4-share a, html[data-ui-round] .series-l4 .l4-share button { border-radius: var(--ui-r-full); }

/* ── Hand-styled controls and cards: profile layout 2 (components/profile/2) ── */
html[data-ui-round] .pl2-tab { border-radius: var(--ui-r-lg); }
html[data-ui-round] .pl2-tab-n, html[data-ui-round] .pl2-chip, html[data-ui-round] .pl2-tier { border-radius: var(--ui-r-full); }
html[data-ui-round] .pl2-stat-ico { border-radius: var(--ui-r-lg); }
html[data-ui-round] .pl2-card, html[data-ui-round] .pl2-tabs { border-radius: var(--ui-rc-2xl); }
html[data-ui-round] .pl2-stat { border-radius: var(--ui-rc-xl); } /* not .pl2-avatar: avatars stay round */

/* ── The housings that follow too: the community bar's cards / strip — the panels' corner (the series page's panels, the
   chapter end card and the row panels stand right beside them) — and header design 4's floating panel ── */
html[data-ui-round] #community-bar .cb-card, html[data-ui-round] #community-bar[data-design="2"] .cb-grid { border-radius: var(--ui-rc-2xl); }
html[data-ui-round] #site-nav[data-header="4"] .hdr-bar { border-radius: var(--ui-r-card); }

/* ── Hand-styled controls: community bar, reader, coins modal ── */
/* the bar's own rules are id-scoped (#community-bar …), so these carry the id too; design 3 (solid pills) included */
html[data-ui-round] #community-bar .cb-share-btn { border-radius: var(--ui-r-full); }
html[data-ui-round] #community-bar .cb-pill { border-radius: var(--ui-r-lg); } /* the Report / Discord / Ko-Fi buttons share the header buttons' corner */
html[data-ui-round] #community-bar .cb-close { border-radius: var(--ui-r-lg); }
html[data-ui-round] .rd-btn, html[data-ui-round] .rd-opt, html[data-ui-round] .rd-opt-head, html[data-ui-round] .rd-chip, html[data-ui-round] .rd-color-input { border-radius: var(--ui-r-lg); }
html[data-ui-round] .rd-seg-btn, html[data-ui-round] .rd-opt-item, html[data-ui-round] .rd-stepbox-btn { border-radius: var(--ui-r-md); }
html[data-ui-round] #rd-menu-tab { border-radius: var(--ui-r-xl); }
/* the rest of the reader menu: the page / chapter select and the novel page's − / + boxes beside the buttons, the segmented
   tracks (their options above), the key hints, the end card's Next button; slider thumbs and tracks follow the switches */
html[data-ui-round] .rd-sel, html[data-ui-round] .rd-seg, html[data-ui-round] .rd-stepbox, html[data-ui-round] .rd-end-next { border-radius: var(--ui-r-lg); }
html[data-ui-round] .rd-hint kbd { border-radius: var(--ui-r-sm); }
html[data-ui-round] .rd-range, html[data-ui-round] .rd-range::-webkit-slider-thumb, html[data-ui-round] .rd-range::-webkit-slider-runnable-track { border-radius: var(--ui-r-full); }
html[data-ui-round] .rd-range::-moz-range-thumb, html[data-ui-round] .rd-range::-moz-range-track { border-radius: var(--ui-r-full); }
/* the boxes that house a setting (label + segmented bar / slider / switch) and the end-of-chapter card: card scale — a
   two-line box must not turn into a lozenge at the pill level; rows inside a .rd-group stay square (the group clips them) */
html[data-ui-round] :is(.rd-row-toggle, .rd-row-slider):not(.rd-group > *), html[data-ui-round] .rd-group { border-radius: var(--ui-rc-lg); }
html[data-ui-round] .rd-end { border-radius: var(--ui-rc-2xl); }
html[data-ui-round] .rd-opt-list.is-open { border-radius: var(--ui-r-panel); }
/* the Buy Coins modal (coins-modal.css, id-scoped rules): PayPal / Crypto method buttons, the checkout CTA and the coin
   icon tile at the large-button corner; − / + steppers, presets, close button and the address box at the standard one;
   the amount panel and the QR frame on the card scale; the dialog card too — on phones it is a full-screen sheet and
   stays square, and its close button stays round */
html[data-ui-round] #coins-modal .cm-method, html[data-ui-round] #coins-modal .cm-cta, html[data-ui-round] #coins-modal .cm-badge { border-radius: var(--ui-r-xl); }
html[data-ui-round] #coins-modal .cm-step > button, html[data-ui-round] #coins-modal .cm-pay-btn, html[data-ui-round] #coins-modal .cm-preset,
html[data-ui-round] #coins-modal .cm-pay-addrbox, html[data-ui-round] #coins-modal .cm-x, html[data-ui-round] #coins-modal .cm-dd-btn { border-radius: var(--ui-r-lg); }
html[data-ui-round] #coins-modal .cm-dd-opt { border-radius: var(--ui-r-md); }
html[data-ui-round] #coins-modal .cm-dd-menu { border-radius: var(--ui-r-panel); }
html[data-ui-round] #coins-modal .cm-chip, html[data-ui-round] #coins-modal .cm-pay-addrbox button { border-radius: var(--ui-r-md); }
html[data-ui-round] #coins-modal .cm-box, html[data-ui-round] #coins-modal .cm-sum { border-radius: var(--ui-rc-xl); }
html[data-ui-round] #coins-modal .cm-preset em { border-radius: var(--ui-r-full); } /* the "Popular" tag: a pill, squared at the low levels */
html[data-ui-round] #coins-modal .cm-methods { border-radius: calc(var(--ui-r-xl) * 1.25); } /* the method track: a little rounder than the pills inside it */
html[data-ui-round] #coins-modal .cm-pay-qr { border-radius: var(--ui-rc-lg); }
@media (min-width: 640px) { html[data-ui-round] #coins-modal .cm-card { border-radius: var(--ui-rc-2xl); } }
@media (max-width: 639.98px) { html[data-ui-round] #coins-modal .cm-x { border-radius: var(--ui-r-full); } }

/* ── Covers and cards, Tailwind-classed: any framed box that clips an image (the home / browse / search cards and their
   cover wrappers, poster rows, tier-list covers, chapter thumbnails, the series page poster, the hero slides …) by its
   radius class; rounded-full is left out so avatars stay round. Images that carry their own radius follow too. ── */
html[data-ui-round] :is(a, div, span, figure, li, section, article).rounded.overflow-hidden:has(img)     { border-radius: var(--ui-rc-sm); }
html[data-ui-round] :is(a, div, span, figure, li, section, article).rounded-md.overflow-hidden:has(img)  { border-radius: var(--ui-rc-md); }
html[data-ui-round] :is(a, div, span, figure, li, section, article).rounded-lg.overflow-hidden:has(img)  { border-radius: var(--ui-rc-lg); }
html[data-ui-round] :is(a, div, span, figure, li, section, article).rounded-xl.overflow-hidden:has(img)  { border-radius: var(--ui-rc-xl); }
html[data-ui-round] :is(a, div, span, figure, li, section, article).rounded-2xl.overflow-hidden:has(img) { border-radius: var(--ui-rc-2xl); }
/* the site's surface panels — rounded-xl / -2xl bg-surface cards (the series page's info, chapter and review cards and
   the like) — share the scale so a page reads as one at every level */
html[data-ui-round] :is(div, section, aside, article).rounded-xl.bg-surface  { border-radius: var(--ui-rc-xl); }
html[data-ui-round] :is(div, section, aside, article).rounded-2xl.bg-surface { border-radius: var(--ui-rc-2xl); }
html[data-ui-round] :is(div, section, aside, article).rounded-xl.border  { border-radius: var(--ui-rc-xl); }  /* bordered panels: review cards + form, empty states … */
html[data-ui-round] :is(div, section, aside, article).rounded-2xl.border { border-radius: var(--ui-rc-2xl); }
html[data-ui-round] a.rounded-xl.bg-surface { border-radius: var(--ui-rc-xl); }  /* the home's recent chapter cards are links */
html[data-ui-round] img.rounded    { border-radius: var(--ui-rc-sm); }
html[data-ui-round] img.rounded-md { border-radius: var(--ui-rc-md); }
html[data-ui-round] img.rounded-lg { border-radius: var(--ui-rc-lg); }
html[data-ui-round] img.rounded-xl { border-radius: var(--ui-rc-xl); }
/* the Featured hero slides run edge to edge on phones (design 1): no corners there whatever the level */
@media (max-width: 639.98px) {
    html[data-ui-round] .series-slider-track .slide-img-card.rounded-2xl.overflow-hidden { border-radius: 0; }
}

/* ── Covers and cards, hand-styled: home sliders ── */
html[data-ui-round] .ec-cover, html[data-ui-round] .slider8-cover { border-radius: var(--ui-rc-lg); }
html[data-ui-round] .ec-panel, html[data-ui-round] .slider3-poster, html[data-ui-round] .slider4-cover { border-radius: var(--ui-rc-xl); }
html[data-ui-round] .slider2-card, html[data-ui-round] .slider5-card { border-radius: var(--ui-rc-2xl); }
@media (min-width: 640px) { /* the spotlight and banner slides are full-bleed on phones */
    html[data-ui-round] .slider3-slide, html[data-ui-round] .slider6-slide, html[data-ui-round] .slider4-section { border-radius: var(--ui-rc-2xl); }
}

/* ── Covers and cards, hand-styled: series page layouts ── */
html[data-ui-round] .series-l3 .l3-poster { border-radius: var(--ui-rc-lg); }
html[data-ui-round] .series-l2 .l2-poster { border-radius: var(--ui-rc-xl); }
html[data-ui-round] .series-l2 .l2-card, html[data-ui-round] .series-l2 .l2-panel,
html[data-ui-round] .series-l3 .l3-card, html[data-ui-round] .series-l4 .l4-card, html[data-ui-round] .series-l4 .l4-side .poster-slider-section, html[data-ui-round] .series-l5 .l5-cover { border-radius: var(--ui-rc-2xl); }
@media (min-width: 640px) { html[data-ui-round] .series-l3 .l3-banner { border-radius: var(--ui-rc-2xl); } } /* on phones the banner runs full-bleed and square (components/series/3) */
html[data-ui-round] #chapters-list.is-grid .chapter-row, html[data-ui-round] #sidebar-ch-list.is-grid .sidebar-ch-row { border-radius: var(--ui-rc-lg); }
/* chapter list / reader sidebar thumbnails: Tailwind `rounded` on layout 1 (skeleton rows included); layouts 2-5 size and
   round them with id-weighted rules of their own, so these carry the id too; grid cards keep the thumbnail flat */
html[data-ui-round] #chapters-list .ch-thumb, html[data-ui-round] #sidebar-ch-list .sch-thumb { border-radius: var(--ui-rc-sm); }
html[data-ui-round] .series-l3 #chapters-list .ch-thumb, html[data-ui-round] .series-l4 #chapters-list .ch-thumb { border-radius: var(--ui-rc-md); }
html[data-ui-round] .series-l2 #chapters-list .ch-thumb, html[data-ui-round] .series-l5 #chapters-list .ch-thumb { border-radius: var(--ui-rc-lg); }
html[data-ui-round] #chapters-list.is-grid .ch-thumb, html[data-ui-round] #sidebar-ch-list.is-grid .sch-thumb { border-radius: 0; }

/* ── Covers and cards, hand-styled: Recently Updated and the home's recent chapters ── */
html[data-ui-round] .ru-card { border-radius: var(--ui-rc-2xl); }
html[data-ui-round] .ru-media { border-radius: var(--ui-rc-xl); }
html[data-ui-round] .ru-row, html[data-ui-round] .ru-seg button { border-radius: var(--ui-r-md); }
html[data-ui-round] .ru-page, html[data-ui-round] .ru-retry, html[data-ui-round] .ru-seg { border-radius: var(--ui-r-lg); }
html[data-ui-round] #recent-updated-section .rc-pop { border-radius: var(--ui-r-panel); }
html[data-ui-round] #recent-updated-section .rc-pop-row { border-radius: var(--ui-r-lg); }

/* ── Series page extras ── */
html[data-ui-round] .disc-note { border-radius: var(--ui-rc-xl); }
/* the bulk-unlock banner (components/bulk-chapters) writes its radii inline, hence the !important */
html[data-ui-round] #bulk-chapters-slot section[data-series-uid] { border-radius: var(--ui-rc-xl) !important; }
/* series layout 5 stands the banner between the Share card and the chapters, as a card of the column: the Share card's corner */
html[data-ui-round] .series-l5 .l5-main > #bulk-chapters-slot section[data-series-uid] { border-radius: var(--ui-rc-2xl) !important; }
html[data-ui-round] #bulk-chapters-slot .bcw > span, html[data-ui-round] #bulk-chapters-slot .bcc { border-radius: var(--ui-r-lg) !important; }
/* the per-row download button (offline.js injects its style) — flat inside grid cards, whose corners clip it */
html[data-ui-round] .mo-row-btn { border-radius: var(--ui-r-lg); }
html[data-ui-round] #chapters-list.is-grid .mo-row-btn, html[data-ui-round] #sidebar-ch-list.is-grid .mo-row-btn { border-radius: 0; }
/* ── Offline downloads page (/?downloads; offline.js renders it and injects its own style). The series sections and
   the count pill already follow through the card / pill rules; these are the hand-styled parts. ── */
html[data-ui-round] #downloads-root .mo-lib-del { border-radius: var(--ui-r-lg); }
html[data-ui-round] #downloads-root .mo-thumb { border-radius: var(--ui-rc-sm); }
html[data-ui-round] #downloads-root .mo-series-cover { border-radius: var(--ui-rc-md); }
html[data-ui-round] #downloads-root .animate-pulse > .rounded-xl { border-radius: var(--ui-rc-xl); } /* the loading placeholders */
/* its Select / Delete bar and the select mode's tick boxes */
html[data-ui-round] #downloads-root .mo-tb-btn { border-radius: var(--ui-r-lg); }
html[data-ui-round] #downloads-root .mo-bar.is-selecting { border-radius: var(--ui-r-card); }
html[data-ui-round] #downloads-root .mo-sel-box { border-radius: var(--ui-r-sm); } /* square at 0, a round tick at the pill level */
/* the saved / removed / failed notice and its dismiss ✕ */
html[data-ui-round] #mo-toast { border-radius: var(--ui-r-panel); }
html[data-ui-round] #mo-toast .mo-toast-x { border-radius: var(--ui-r-lg); }
/* the reviews' Sort / Rating dropdowns */
html[data-ui-round] .rv-select-btn, html[data-ui-round] .rv-opt { border-radius: var(--ui-r-lg); }
html[data-ui-round] .rv-panel { border-radius: var(--ui-r-panel); }
html[data-ui-round] .rv-chip, html[data-ui-round] .rv-clear, html[data-ui-round] .rv-count { border-radius: var(--ui-r-md); }
html[data-ui-round] .rv-chip-x, html[data-ui-round] .rv-box { border-radius: var(--ui-r-sm); }

/* ── The Bulk Unlock dialog (components/bulk-chapters): its radii are written inline / by its script, hence the
   !important. The unlock CTA and "Start reading" at the large-button corner, × and the chapter rows at the standard one,
   the % OFF pill at the small one; the dialog on the card scale (a sheet below 768px: top corners only).
   The tick boxes ("Select all remaining" + the rows) are drawn by assets/styles/bulk-chapters.css — a box filled with
   the viewer accent and ticked when checked — and take the small-control corner here; the price panel and the cover
   sit on the card scale, as the locked-chapter dialog's do. ── */
html[data-ui-round] #bulk-chapters-panel [data-bulk-confirm], html[data-ui-round] #bulk-chapters-panel [data-bulk-body] button { border-radius: var(--ui-r-xl) !important; }
html[data-ui-round] #bulk-chapters-panel [data-bulk-close], html[data-ui-round] #bulk-chapters-panel [data-bulk-list] label { border-radius: var(--ui-r-lg) !important; }
html[data-ui-round] #bulk-chapters-panel b[style*="border-radius"], html[data-ui-round] #bulk-chapters-slot b[style*="border-radius"] { border-radius: var(--ui-r-sm) !important; }
html[data-ui-round] #bulk-chapters-panel { border-radius: var(--ui-rc-2xl) var(--ui-rc-2xl) 0 0 !important; }
@media (min-width: 768px) { html[data-ui-round] #bulk-chapters-panel { border-radius: var(--ui-rc-2xl) !important; } }
html[data-ui-round] #bulk-chapters-panel input[type="checkbox"], html[data-ui-round] #bulk-chapters-panel .bu-skel.is-box { border-radius: var(--ui-r-sm); }
html[data-ui-round] #bulk-chapters-panel [data-bulk-topup] { border-radius: var(--ui-r-xl); }
html[data-ui-round] #bulk-chapters-panel .bu-facts { border-radius: var(--ui-rc-xl); }
html[data-ui-round] #bulk-chapters-panel .bu-cover { border-radius: var(--ui-rc-md); }

/* ── Filter dropdowns (components/filter-select: browse + the profile reading list's Series type / Status / Sort / Genres)
   — the same split as the reviews' dropdowns above. The button is capped at half its one-line height: a pill at the pill
   level, but not a lozenge once the Genres chips wrap onto a second line. ── */
html[data-ui-round] .fsel-btn { border-radius: min(var(--ui-r-lg), 19px); }
html[data-ui-round] .fsel-opt, html[data-ui-round] .fsel-search { border-radius: var(--ui-r-lg); }
html[data-ui-round] .fsel-panel { border-radius: var(--ui-r-panel); }
html[data-ui-round] .fsel-chip, html[data-ui-round] .fsel-clear, html[data-ui-round] .fsel-count { border-radius: var(--ui-r-md); }
html[data-ui-round] .fsel-chip-x, html[data-ui-round] .fsel-box:not(.fsel-box-radio) { border-radius: var(--ui-r-sm); }
/* link tiles with a hairline (the profile XP tab's Rank tile beside its div siblings) share the card scale */
html[data-ui-round] a.rounded-xl.border { border-radius: var(--ui-rc-xl); }

/* ── The Earn XP page (/?earn-xp) and the profile's Achievements cards, which share its language: the way cards are
   borderless boxes painted in the surface colour inline (so the bg-surface / border rules above miss them); the tinted
   icon box follows the menus' icon tiles; the "One-time" tag is a small square-cornered text badge. ── */
html[data-ui-round] div.rounded-xl[style*="background:rgb(var(--c-surface))"] { border-radius: var(--ui-rc-xl); }
html[data-ui-round] div.flex.w-11.h-11.rounded-xl { border-radius: var(--ui-r-xl); }
html[data-ui-round] span.rounded[class*="px-"] { border-radius: var(--ui-r-sm); }

/* ── Quick bookmark (quick-bookmark.css): the + on covers follows the pill token like the round icon buttons; the dialog
   sits on the card scale (a bottom sheet below 768px, .qb-sheet: top corners only), its list buttons, icon tiles and × on
   the control scale ── */
/* the locked-chapter dialog (chapter-lock.css): buttons at the large-button corner, × at the standard one, the price
   panel and cover on the card scale; the dialog a sheet below 640px (top corners only) */
html[data-ui-round] .cl-btn, html[data-ui-round] .cl-skel-btn { border-radius: var(--ui-r-xl); }
html[data-ui-round] .cl-x { border-radius: var(--ui-r-lg); }
html[data-ui-round] .cl-facts { border-radius: var(--ui-rc-xl); }
html[data-ui-round] .cl-cover { border-radius: var(--ui-rc-md); }
html[data-ui-round] .cl-dialog { border-radius: var(--ui-rc-2xl); }
@media (max-width: 639.98px) { html[data-ui-round] .cl-dialog { border-radius: var(--ui-rc-2xl) var(--ui-rc-2xl) 0 0; } }
html[data-ui-round] .ps-off { border-radius: var(--ui-r-md); } /* the "% OFF" badge on a discounted cover (components/poster-slider) */
html[data-ui-round] .qb-btn { border-radius: var(--ui-r-full); }
html[data-ui-round] .qb-opt, html[data-ui-round] .qb-remove, html[data-ui-round] .qb-x, html[data-ui-round] .qb-ico { border-radius: var(--ui-r-lg); }
html[data-ui-round] .qb-cover { border-radius: var(--ui-rc-md); }
html[data-ui-round] .qb-dialog { border-radius: var(--ui-rc-2xl); }
html[data-ui-round] .qb-dialog.qb-sheet { border-radius: var(--ui-rc-2xl) var(--ui-rc-2xl) 0 0; }
/* the Appearance dialog (global-deferred.css): the same family — the frame on the card scale (a sheet below 768px: top
   corners only), its × and head tile on the standard control corner; a theme's card holds a picture, so it follows the
   large-button corner but never becomes a pill, and its miniature takes the cover scale */
html[data-ui-round] .td-dialog { border-radius: var(--ui-rc-2xl); }
html[data-ui-round] .td-dialog.td-sheet { border-radius: var(--ui-rc-2xl) var(--ui-rc-2xl) 0 0; }
html[data-ui-round] .td-x, html[data-ui-round] .td-tile { border-radius: var(--ui-r-lg); }
html[data-ui-round] .td-opt { border-radius: min(var(--ui-r-xl), 1rem); }
html[data-ui-round] .td-prev { border-radius: var(--ui-rc-lg); }
