/* ============================================================
   Reader-mode interaction panels — shared, non-scoped styles.

   Why a separate stylesheet (not *.razor.css)?
     Blazor's scoped-CSS attribute only attaches to elements
     inside the matching .razor file. The panels render comment
     bubbles + rating rows in a loop (and PageCommentsPanel uses
     a RenderFragment for the comment shape), so scoped CSS would
     miss most of the markup. comments.css burned us first; the
     publish-page checklist burned us second; this is the same
     pattern, hoisted to a stylesheet that both Web (App.razor)
     and MAUI (index.html) reference.
   ============================================================ */

/* ---- Panel envelope (slide-in drawer on tablet+, full-bleed on phone) ---- */
.page-comments-panel,
.chapter-rating-panel,
.reader-customize-panel {
    position: fixed;
    top: 48px; /* sits flush below the reader top bar */
    right: 0;
    bottom: 0;
    width: min(420px, 100vw);
    box-shadow: var(--os-shadow-md);
    display: flex;
    flex-direction: column;
    z-index: 90;
    animation: reader-panel-slide-in var(--os-transition-fast) ease-out;
    min-width: 0;
}

.chapter-rating-panel,
.reader-customize-panel {
    background-color: var(--os-surface);
    border-left: 1px solid var(--os-border);
}

/* task-7: page comments panel goes glass — the rating panel (untouched by
   this task) keeps the solid --os-surface envelope above. */
.page-comments-panel {
    background: var(--os-glass-bg-strong);
    border-left: 1px solid var(--os-glass-border);
}

@supports (backdrop-filter: blur(1px)) {
    .page-comments-panel {
        backdrop-filter: blur(var(--os-glass-blur, 16px));
        -webkit-backdrop-filter: blur(var(--os-glass-blur, 16px));
    }
}

@keyframes reader-panel-slide-in {
    from { transform: translateX(16px); opacity: 0; }
    to   { transform: translateX(0);     opacity: 1; }
}

@media (max-width: 480px) {
    .page-comments-panel,
    .chapter-rating-panel,
    .reader-customize-panel {
        top: 48px;
        width: 100vw;
    }
}

/* ---- Headers ---- */
.page-comments-panel__header,
.chapter-rating-panel__header,
.reader-customize-panel__header {
    display: flex;
    align-items: center;
    gap: var(--os-space-sm);
    padding: var(--os-space-md);
    border-bottom: 1px solid var(--os-border);
    background-color: var(--os-surface);
}

.page-comments-panel__header-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.page-comments-panel__title,
.chapter-rating-panel__title,
.reader-customize-panel__title {
    flex: 1;
    margin: 0;
    font-size: var(--os-font-size-md);
    font-weight: var(--os-font-weight-semibold);
    color: var(--os-text-primary);
}

.page-comments-panel__subtitle {
    margin: 0;
    font-size: var(--os-font-size-xs);
    color: var(--os-text-secondary);
}

.page-comments-panel__close,
.chapter-rating-panel__close,
.reader-customize-panel__close {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border: none;
    background-color: transparent;
    color: var(--os-text-secondary);
    border-radius: var(--os-radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--os-transition-fast), color var(--os-transition-fast);
}

.page-comments-panel__close:hover,
.page-comments-panel__close:focus-visible,
.chapter-rating-panel__close:hover,
.chapter-rating-panel__close:focus-visible,
.reader-customize-panel__close:hover,
.reader-customize-panel__close:focus-visible {
    background-color: var(--os-surface-variant);
    color: var(--os-text-primary);
    outline: none;
}

/* ---- Bodies (scrollable) ---- */
.page-comments-panel__body,
.chapter-rating-panel__body,
.reader-customize-panel__body {
    flex: 1;
    overflow-y: auto;
    padding: var(--os-space-md);
    display: flex;
    flex-direction: column;
    gap: var(--os-space-lg);
}

.page-comments-panel__loading,
.chapter-rating-panel__loading,
.reader-customize-panel__loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--os-space-xl) 0;
}

.page-comments-panel__empty,
.chapter-rating-panel__hint {
    color: var(--os-text-secondary);
    font-size: var(--os-font-size-sm);
    margin: 0;
}

/* ---- Page comments — current-page thread (task-7) ---- */
.page-comments-panel__thread,
.page-comments-panel__replies {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--os-space-sm);
}

/* Visual depth cap (mirrors CommentItem's MaxVisualDepth=3, but as a CSS
   custom property rather than a [data-depth] attribute selector — this
   panel's items aren't the .comment-section__item card shape, just a
   plain indented bubble row). */
.page-comments-panel__item {
    margin-inline-start: calc(var(--depth, 0) * var(--os-space-md));
    min-width: 0;
}

.page-comments-panel__replies {
    margin-top: var(--os-space-sm);
    padding-left: var(--os-space-md);
    border-left: 2px solid var(--os-border);
}

/* ---- Comment bubble ---- */
.page-comments-panel__bubble {
    display: flex;
    gap: var(--os-space-sm);
    min-width: 0;
}

.page-comments-panel__avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--os-text-secondary);
    font-size: var(--os-font-size-xs);
}

.page-comments-panel__avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--os-radius-full);
    overflow: hidden;
    background: linear-gradient(135deg, #6d28d9, #3b1f6e);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--os-font-size-xs);
    font-weight: var(--os-font-weight-semibold);
    flex-shrink: 0;
}

/* Task 18a: the avatar is now the shared <AuthorAvatar> component (real <img>
   or the placeholder <span>) instead of a raw <img>/plain-text fallback —
   stretch whichever root element it renders to fill this 28px circle instead
   of AuthorAvatar's own fixed Size="sm" (48px) box. Only width/height are
   overridden (NOT display), so the placeholder span's own flex-centering of
   its initials text is left intact. */
.page-comments-panel__avatar .author-avatar {
    width: 100%;
    height: 100%;
}

.page-comments-panel__avatar img.author-avatar {
    object-fit: cover;
}

.page-comments-panel__avatar .author-avatar__initials {
    font-size: var(--os-font-size-xs);
}

.page-comments-panel__bubble-body {
    flex: 1;
    min-width: 0;
}

.page-comments-panel__bubble-meta {
    display: flex;
    align-items: center;
    gap: var(--os-space-xs);
    flex-wrap: wrap;
    font-size: var(--os-font-size-xs);
}

.page-comments-panel__author {
    font-weight: var(--os-font-weight-semibold);
    color: var(--os-text-primary);
}

.page-comments-panel__timestamp {
    color: var(--os-text-secondary);
}

.page-comments-panel__text {
    margin: var(--os-space-xs) 0 0;
    font-size: var(--os-font-size-sm);
    color: var(--os-text-primary);
    word-break: break-word;
    white-space: pre-wrap;
}

/* ---- Quote block — a comment raised from a text selection (task-4/7) ----
   Accent border uses --os-primary rather than --os-glass-highlight: the
   latter is a full inset box-shadow value everywhere else it's defined
   (glass-chrome.css, comment-composer.css), not a color, so `border-color:
   var(--os-glass-highlight)` would be invalid CSS and silently drop the
   whole border-inline-start declaration. */
.page-comments-panel__quote {
    margin: var(--os-space-xs) 0 0;
    padding: var(--os-space-xs) var(--os-space-sm);
    border-inline-start: 3px solid var(--os-primary);
    background: var(--os-glass-bg);
    border-radius: var(--os-radius-sm);
    font-style: italic;
    font-size: var(--os-font-size-sm);
    color: var(--os-text-secondary);
    word-break: break-word;
    cursor: pointer;
    min-width: 0;
}

/* ---- Composer (sticky footer) ---- */
.page-comments-panel__composer {
    flex: 0 0 auto;
    padding: var(--os-space-md);
    border-top: 1px solid var(--os-border);
    min-width: 0;
}

.page-comments-panel__post-error {
    margin: var(--os-space-xs) 0 0;
    font-size: var(--os-font-size-xs);
    color: var(--os-danger, #dc2626);
    min-width: 0;
}

.page-comments-panel__quote-chip {
    display: flex;
    align-items: center;
    gap: var(--os-space-sm);
    padding: var(--os-space-xs) var(--os-space-sm);
    border-inline-start: 3px solid var(--os-primary);
    background: var(--os-glass-bg);
    border-radius: var(--os-radius-sm);
    min-width: 0;
}

.page-comments-panel__quote-chip-text {
    flex: 1;
    min-width: 0;
    font-style: italic;
    font-size: var(--os-font-size-sm);
    color: var(--os-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-comments-panel__quote-chip-remove {
    flex: 0 0 auto;
    border: none;
    background: none;
    color: var(--os-text-secondary);
    font-size: var(--os-font-size-md);
    line-height: 1;
    cursor: pointer;
    padding: 0 var(--os-space-xs);
}

.page-comments-panel__quote-chip-remove:hover {
    color: var(--os-text-primary);
}

.page-comments-panel__sign-in-hint {
    font-size: var(--os-font-size-xs);
    color: var(--os-text-secondary);
    margin: 0;
    font-style: italic;
}

/* ---- Selection pill + quote highlight (task-8) ----
   The pill is created lazily by readerSelection.js and appended straight to
   document.body (NOT inside .story-reader__content) so it can float above
   the selection regardless of the content column's own stacking context —
   position is set inline per-selection (top/left from getBoundingClientRect
   + scroll offsets), only the chrome lives here. */
.reader-selection-pill {
    position: absolute;
    z-index: 30;
    transform: translateX(-50%);
    background: var(--os-glass-bg-strong);
    color: var(--os-text-primary);
    border: 1px solid var(--os-glass-border);
    border-radius: var(--os-radius-full);
    box-shadow: var(--os-elevation-1, var(--os-shadow-sm));
    padding: var(--os-space-xs) var(--os-space-md);
    font-size: var(--os-font-size-sm);
    font-weight: var(--os-font-weight-semibold);
    cursor: pointer;
    white-space: nowrap;
}

@supports (backdrop-filter: blur(1px)) {
    .reader-selection-pill {
        backdrop-filter: blur(var(--os-glass-blur, 16px));
        -webkit-backdrop-filter: blur(var(--os-glass-blur, 16px));
    }
}

.reader-selection-pill:hover,
.reader-selection-pill:focus-visible {
    background: var(--os-glass-bg);
}

/* Quote-hover highlight — the span StoryReader.HighlightAsync wraps in the
   page's rendered text when a reader hovers/clicks a comment's quote block
   in PageCommentsPanel. Deliberately mixes --os-primary, NOT
   --os-glass-highlight, despite that being the token this task's own brief
   named: --os-glass-highlight resolves to an `inset 0 1px 0 rgba(...)`
   box-shadow value everywhere it's defined (see the accent-border comment
   a few rules below) — feeding a box-shadow value into color-mix() is
   invalid CSS, and the WHOLE background declaration would be dropped, so
   the "highlight" would silently never render. --os-primary matches the
   quote-chip/quote-block accent already used elsewhere in this panel. */
mark.reader-quote-highlight {
    background: color-mix(in srgb, var(--os-primary) 35%, transparent);
    color: inherit;
    border-radius: 2px;
}

/* ---- Chapter rating panel ---- */
.chapter-rating-panel__row {
    display: flex;
    flex-direction: column;
    gap: var(--os-space-xs);
    padding: var(--os-space-sm);
    background-color: var(--os-background);
    border: 1px solid var(--os-border);
    border-radius: var(--os-radius-md);
}

.chapter-rating-panel__chapter-title {
    margin: 0;
    font-size: var(--os-font-size-sm);
    font-weight: var(--os-font-weight-semibold);
    color: var(--os-text-primary);
}

.chapter-rating-panel__user,
.chapter-rating-panel__aggregate {
    display: flex;
    align-items: center;
    gap: var(--os-space-sm);
    flex-wrap: wrap;
}

.chapter-rating-panel__aggregate {
    color: var(--os-text-secondary);
    font-size: var(--os-font-size-xs);
}

/* Compact text-only aggregate caption shown beneath the interactive
   stars in the signed-in non-author branch — replaces the second
   StarRating that used to render here, so each chapter shows exactly
   one row of stars. Hidden entirely when RatingCount is 0. */
.chapter-rating-panel__aggregate-caption {
    margin: 0;
    color: var(--os-text-secondary);
    font-size: var(--os-font-size-xs);
}

.chapter-rating-panel__clear {
    font-size: var(--os-font-size-xs);
}

.chapter-rating-panel__row--readonly .star-rating__star--interactive {
    cursor: default;
}

/* ---- Reader customize panel (task-7) ---- */
.reader-customize-panel__slot {
    display: flex;
    flex-direction: column;
    gap: var(--os-space-xs);
}

.reader-customize-panel__slot-title {
    margin: 0;
    font-size: var(--os-font-size-sm);
    font-weight: var(--os-font-weight-semibold);
    color: var(--os-text-primary);
}

/* Wraps rather than scrolling horizontally — the shared "no page may
   scroll horizontally" rule applies to this drawer too. */
.reader-customize-panel__options {
    display: flex;
    flex-wrap: wrap;
    gap: var(--os-space-xs);
    min-width: 0;
}

.reader-customize-panel__option {
    display: flex;
    align-items: center;
    gap: var(--os-space-xs);
    padding: var(--os-space-xs) var(--os-space-sm);
    border: 1px solid var(--os-border);
    border-radius: var(--os-radius-md);
    background-color: var(--os-background);
    color: var(--os-text-primary);
    font-size: var(--os-font-size-xs);
    cursor: pointer;
    transition: background-color var(--os-transition-fast), border-color var(--os-transition-fast);
}

.reader-customize-panel__option:hover,
.reader-customize-panel__option:focus-visible {
    background-color: var(--os-surface-variant);
    outline: none;
}

.reader-customize-panel__option--active {
    border-color: var(--os-primary);
    background-color: var(--os-surface-variant);
    color: var(--os-primary);
}

.reader-customize-panel__option-thumb {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.reader-customize-panel__dedication-text {
    width: 100%;
    min-height: 72px;
    padding: var(--os-space-sm);
    border: 1px solid var(--os-border);
    border-radius: var(--os-radius-md);
    background-color: var(--os-background);
    color: var(--os-text-primary);
    font: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.reader-customize-panel__save {
    align-self: flex-start;
}

.reader-customize-panel__save-error {
    margin: 0;
    font-size: var(--os-font-size-xs);
    color: var(--os-danger, #dc2626);
}

.reader-customize-panel__gift {
    display: flex;
    flex-direction: column;
    gap: var(--os-space-xs);
    padding: var(--os-space-sm);
    border: 1px solid var(--os-border);
    border-radius: var(--os-radius-md);
    background-color: var(--os-background);
}

.reader-customize-panel__gift-label {
    font-size: var(--os-font-size-sm);
    font-weight: var(--os-font-weight-semibold);
    color: var(--os-text-primary);
}

.reader-customize-panel__gift-hint {
    margin: 0;
    font-size: var(--os-font-size-xs);
    color: var(--os-text-secondary);
}

.reader-customize-panel__gift-row {
    display: flex;
    gap: var(--os-space-xs);
    min-width: 0;
}

.reader-customize-panel__gift-input {
    flex: 1;
    min-width: 0;
    padding: var(--os-space-xs) var(--os-space-sm);
    border: 1px solid var(--os-border);
    border-radius: var(--os-radius-md);
    background-color: var(--os-surface);
    color: var(--os-text-primary);
    font-size: var(--os-font-size-xs);
}

/* ---- Customize panel v2: collapsible sections ---- */
.reader-customize-panel__section {
    display: flex;
    flex-direction: column;
    gap: var(--os-space-md);
    border: 1px solid var(--os-border);
    border-radius: var(--os-radius-md);
    padding: var(--os-space-sm) var(--os-space-md) var(--os-space-md);
    min-width: 0;
}

.reader-customize-panel__section-title {
    font-size: var(--os-font-size-sm);
    font-weight: var(--os-font-weight-semibold);
    color: var(--os-text-primary);
    cursor: pointer;
    user-select: none;
    padding: var(--os-space-xs) 0;
}

.reader-customize-panel__section:not([open]) {
    padding-bottom: var(--os-space-sm);
}

/* ---- Skin chips: CSS-rendered mini-pane previews ---- */
.reader-customize-panel__skins {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--os-space-xs);
    min-width: 0;
}

.reader-customize-panel__skin-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--os-space-xs);
    padding: var(--os-space-xs);
    border: 1px solid var(--os-border);
    border-radius: var(--os-radius-md);
    background-color: var(--os-background);
    color: var(--os-text-primary);
    font-size: var(--os-font-size-xs);
    cursor: pointer;
    min-width: 0;
    transition: background-color var(--os-transition-fast), border-color var(--os-transition-fast);
}

.reader-customize-panel__skin-chip:hover,
.reader-customize-panel__skin-chip:focus-visible {
    background-color: var(--os-surface-variant);
    outline: none;
}

.reader-customize-panel__skin-chip--active {
    border-color: var(--os-primary);
    color: var(--os-primary);
}

/* Each preview is a tiny pane with the skin's own fixed palette plus
   three faux text lines so the chip reads as "a page in that look". */
.reader-customize-panel__skin-preview {
    display: block;
    width: 100%;
    height: 44px;
    border-radius: var(--os-radius-sm);
    border: 1px solid var(--os-border);
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    overflow: hidden;
}

.reader-customize-panel__skin-preview::after {
    content: "";
    position: absolute;
    inset: 9px 12px;
    background: repeating-linear-gradient(180deg,
        currentColor 0 2px,
        transparent 2px 9px);
    opacity: 0.5;
}

.reader-customize-panel__skin-preview--none {
    background: var(--os-surface);
    color: var(--os-text-tertiary);
}

.reader-customize-panel__skin-preview--parchment {
    background: linear-gradient(160deg, #f6ecd4 0%, #e7d3ac 100%);
    border-color: #c9b184;
    color: #6f5b3a;
}

.reader-customize-panel__skin-preview--console {
    background: linear-gradient(165deg, #101725 0%, #0b1120 100%);
    border-color: #24405c;
    color: #5fd0e8;
}

.reader-customize-panel__skin-preview--open-book {
    background: linear-gradient(90deg, #f5eeda 0%, #cbbb9a 49%, #cbbb9a 51%, #f5eeda 100%);
    border-color: #cdbd9b;
    color: #6c5d43;
}

.reader-customize-panel__skin-preview--grimoire {
    background: radial-gradient(ellipse at 50% 40%, #3a2818 0%, #1e1309 100%);
    border-color: #57391c;
    color: #c89b4a;
}

.reader-customize-panel__skin-preview--starfield {
    background: radial-gradient(1px 1px at 20% 30%, rgba(255, 255, 255, 0.9) 50%, transparent 51%),
        radial-gradient(1px 1px at 70% 60%, rgba(255, 255, 255, 0.7) 50%, transparent 51%),
        linear-gradient(180deg, #0a1028 0%, #111b3e 100%);
    border-color: #2c3a66;
    color: #9daccf;
}

.reader-customize-panel__skin-preview--typewriter {
    background: linear-gradient(180deg, #f7f4ec 0%, #f2eee2 100%);
    border-color: #d8d2c0;
    color: #8b2635;
}

/* ---- Dedication style pickers ---- */
.reader-customize-panel__font-sample {
    font-size: 1.1rem;
    line-height: 1;
}

.reader-customize-panel__color-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: var(--os-radius-full);
    border: 1px solid var(--os-border);
}

/* ---- Gift-link manager (v2 multi-link) ---- */
.reader-customize-panel__gift-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--os-space-xs);
    min-width: 0;
}

.reader-customize-panel__gift-row {
    display: flex;
    flex-direction: column;
    gap: var(--os-space-xs);
    padding: var(--os-space-sm);
    border: 1px solid var(--os-border);
    border-radius: var(--os-radius-md);
    background-color: var(--os-background);
    min-width: 0;
}

.reader-customize-panel__gift-row-info {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--os-space-sm);
    min-width: 0;
}

.reader-customize-panel__gift-row-label {
    font-size: var(--os-font-size-sm);
    font-weight: var(--os-font-weight-medium);
    color: var(--os-text-primary);
    overflow-wrap: anywhere;
    min-width: 0;
}

.reader-customize-panel__gift-row-date {
    font-size: var(--os-font-size-xs);
    color: var(--os-text-tertiary);
    flex-shrink: 0;
}

.reader-customize-panel__gift-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--os-space-xs);
    min-width: 0;
}

.reader-customize-panel__gift-action {
    font-size: var(--os-font-size-xs);
    padding: var(--os-space-xs) var(--os-space-sm);
}

.reader-customize-panel__gift-action--danger {
    color: var(--os-danger);
    border-color: var(--os-danger);
}

.reader-customize-panel__gift-create {
    display: flex;
    gap: var(--os-space-xs);
    min-width: 0;
}

.reader-customize-panel__gift-success {
    margin: 0;
    font-size: var(--os-font-size-xs);
    color: var(--os-success);
}

/* ---- Native dialogs (remove confirm + gift email) ---- */
.reader-customize-dialog {
    border: 1px solid var(--os-border);
    border-radius: var(--os-radius-lg);
    background-color: var(--os-surface);
    color: var(--os-text-primary);
    padding: 0;
    max-width: min(28rem, calc(100vw - 2 * var(--os-space-md)));
    box-shadow: var(--os-shadow-lg);
}

.reader-customize-dialog::backdrop {
    background: var(--os-overlay, rgba(0, 0, 0, 0.4));
}

.reader-customize-dialog__card {
    display: flex;
    flex-direction: column;
    gap: var(--os-space-sm);
    padding: var(--os-space-lg);
    min-width: 0;
}

.reader-customize-dialog__title {
    margin: 0;
    font-size: var(--os-font-size-md);
    font-weight: var(--os-font-weight-semibold);
}

.reader-customize-dialog__body {
    margin: 0;
    font-size: var(--os-font-size-sm);
    color: var(--os-text-secondary);
}

.reader-customize-dialog__label {
    font-size: var(--os-font-size-sm);
    font-weight: var(--os-font-weight-medium);
    color: var(--os-text-primary);
}

.reader-customize-dialog__counter {
    align-self: flex-end;
    font-size: var(--os-font-size-xs);
    color: var(--os-text-tertiary);
}

.reader-customize-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--os-space-sm);
    margin-top: var(--os-space-sm);
}

/* ============================================================
   v2 token skin (docs/superpowers/sdd/task-3-brief.md)

   Surface/radius/elevation ONLY — no markup or positioning changes.
   Deliberately appended here (not in PageCommentsPanel.razor.css /
   ChapterRatingPanel.razor.css, which don't exist) rather than as new
   Blazor-scoped-CSS files: per this file's own header comment, both
   panels render their meaningful content (comment bubbles, rating
   rows) via @foreach loops / a RenderFragment, and Blazor's scoped-CSS
   attribute only reliably reaches markup literally written in the
   owning .razor file — a genuinely scoped twin file would silently
   miss most of the rendered tree, the exact bug this stylesheet exists
   to avoid.
   ============================================================ */
html[data-ui="v2"] .page-comments-panel,
html[data-ui="v2"] .chapter-rating-panel,
html[data-ui="v2"] .reader-customize-panel {
    border-radius: var(--os-radius-lg) 0 0 var(--os-radius-lg);
    box-shadow: var(--os-elevation-3, var(--os-shadow-lg));
}

html[data-ui="v2"] .chapter-rating-panel__row {
    border-radius: var(--os-radius-md);
}
