/* 贴合 #app 小手机内容区，而非视口居中弹窗 */
.ao3-root {
    position: absolute;
    inset: 0;
    z-index: 9999;
    overflow: hidden;
    border-radius: inherit;
}

.ao3-root[hidden] {
    display: none;
}

/* AO3 版块内所有滚动条统一为隐形（仍可触摸 / 滚轮滚动） */
.ao3-root,
.ao3-root * {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.ao3-root::-webkit-scrollbar,
.ao3-root *::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* 关闭 AO3 全层时面板会侧滑移出，若不淡化底衬，露出的区域仍是近实色白底，子屏会像「闪白遮罩」。
   与面板关闭同步淡出底衬，让下层子屏幕内容自然露出。 */
.ao3-root__backdrop {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 243, 252, 0.99) 100%);
    opacity: 1;
    transition: opacity 0.2s ease;
    pointer-events: auto;
}

.ao3-root.ao3-root--closing .ao3-root__backdrop {
    opacity: 0;
    pointer-events: none;
}

.ao3-root__panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(248,243,252,0.98) 100%);
    box-shadow: none;
    transform: translate3d(100%, 0, 0);
    opacity: 0.99;
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
    will-change: transform;
}

.ao3-root.ao3-root--open .ao3-root__panel {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .ao3-root__panel {
        transition: none;
        transform: none;
        opacity: 1;
    }

    .ao3-root__backdrop {
        transition: none;
    }
}

.ao3-root__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid rgba(88, 63, 122, 0.12);
}

.ao3-root__back,
.ao3-root__refresh,
.ao3-root__add {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    background: rgba(116, 89, 150, 0.1);
    color: #4f3a69;
    font-size: 20px;
    cursor: pointer;
}

.ao3-root__refresh,
.ao3-root__add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

/* [hidden] 的 UA 样式会被上一条 display 覆盖，须显式隐藏（否则作品详情等页仍可见） */
.ao3-root__refresh[hidden],
.ao3-root__add[hidden] {
    display: none !important;
}

.ao3-root__add {
    font-size: 22px;
    font-weight: 300;
}

.ao3-root__refresh.is-loading,
.ao3-board-refresh.is-loading {
    pointer-events: none;
}

.ao3-root__refresh.is-loading {
    background: rgba(125, 88, 175, 0.18);
    color: #6a46a1;
    animation: ao3-spin 0.9s linear infinite;
}

.ao3-root__back[hidden] {
    visibility: hidden;
}

.ao3-root__title {
    flex: 1;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #362445;
}

.ao3-root__body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.ao3-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ao3-hero,
.ao3-page-card,
.ao3-quick-card,
.ao3-board-card,
.ao3-thread-card,
.ao3-rank-item,
.ao3-menu-item,
.ao3-char-card {
    border: 1px solid rgba(115, 89, 146, 0.12);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 10px 30px rgba(39, 22, 57, 0.08);
}

.ao3-hero,
.ao3-page-card {
    border-radius: 22px;
    padding: 18px;
}

.ao3-hero__hint {
    margin: 14px 0 0;
    font-size: 13px;
    line-height: 1.65;
    color: #6d5c80;
}

.ao3-home-refresh {
    margin-top: 14px;
    width: 100%;
}

.ao3-board-refresh {
    margin-top: 12px;
    width: 100%;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(116, 89, 150, 0.18);
    transition: box-shadow 0.2s ease, opacity 0.2s ease;
}

.ao3-board-refresh__dots {
    display: none;
}

.ao3-board-refresh.is-loading .ao3-board-refresh__label {
    visibility: hidden;
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.ao3-board-refresh.is-loading .ao3-board-refresh__dots {
    display: inline-flex;
}

.ao3-board-refresh.is-loading {
    animation: none;
    cursor: wait;
    box-shadow: 0 10px 22px rgba(125, 88, 175, 0.24);
}

.ao3-page-card__hint {
    margin-top: 10px;
    font-size: 12px;
    color: #8a789b;
}

.ao3-hero__kicker,
.ao3-page-card__kicker {
    font-size: 12px;
    letter-spacing: 0.08em;
    color: #8f6ba8;
}

.ao3-hero__title,
.ao3-page-card__title {
    margin: 8px 0 10px;
    font-size: 24px;
    line-height: 1.35;
    color: #2d1c3c;
}

.ao3-hero__desc,
.ao3-page-card__desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    color: #5c4b6d;
}

.ao3-hero__brand {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #2d1c3c;
}

.ao3-hero__slogan {
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.75;
    color: #5c4b6d;
}

.ao3-hero__slogan:first-of-type {
    margin-top: 14px;
}

.ao3-section__head--title-only {
    justify-content: flex-start;
    margin-bottom: 4px;
}

.ao3-quick-grid,
.ao3-board-grid,
.ao3-char-grid {
    display: grid;
    gap: 12px;
}

.ao3-quick-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ao3-board-grid,
.ao3-char-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ao3-board-more {
    margin-top: 8px;
    border-radius: 18px;
    border: 1px solid rgba(115, 89, 146, 0.12);
    background: rgba(255, 255, 255, 0.92);
    overflow: hidden;
}

.ao3-board-more__summary {
    list-style: none;
    padding: 14px 16px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    color: #332047;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.ao3-board-more__summary::-webkit-details-marker {
    display: none;
}

.ao3-board-more__chev {
    font-size: 10px;
    opacity: 0.55;
    transition: transform 0.2s ease;
}

.ao3-board-more[open] .ao3-board-more__chev {
    transform: rotate(-180deg);
}

.ao3-board-more__body {
    padding: 0 0 12px;
}

.ao3-board-grid--more {
    margin: 0 8px;
}

.ao3-quick-card,
.ao3-board-card,
.ao3-menu-item,
.ao3-char-card,
.ao3-link-btn,
.ao3-thread-card,
.ao3-rank-item,
.ao3-primary-btn,
.ao3-action-btn {
    border-radius: 18px;
    cursor: pointer;
}

.ao3-quick-card,
.ao3-board-card,
.ao3-menu-item,
.ao3-char-card,
.ao3-thread-card,
.ao3-rank-item {
    width: 100%;
    border-width: 1px;
    text-align: center;
}

.ao3-board-card,
.ao3-menu-item,
.ao3-char-card,
.ao3-thread-card,
.ao3-rank-item {
    text-align: left;
}

.ao3-quick-card,
.ao3-board-card,
.ao3-menu-item,
.ao3-char-card,
.ao3-thread-card,
.ao3-rank-item,
.ao3-primary-btn,
.ao3-action-btn,
.ao3-link-btn {
    border-style: solid;
    border-color: rgba(115, 89, 146, 0.12);
    background: rgba(255, 255, 255, 0.92);
}

.ao3-quick-card,
.ao3-board-card,
.ao3-thread-card,
.ao3-rank-item,
.ao3-char-card {
    padding: 16px;
}

.ao3-quick-card__title,
.ao3-board-card__name,
.ao3-section__title,
.ao3-profile__name {
    font-size: 15px;
    font-weight: 700;
    color: #332047;
}

.ao3-quick-card__desc,
.ao3-board-card__desc,
.ao3-section__sub,
.ao3-empty-inline,
.ao3-char-card__meta,
.ao3-profile__bio,
.ao3-form__label,
.ao3-rank-item__sub {
    font-size: 13px;
    line-height: 1.6;
    color: #6d5c80;
}

.ao3-board-card__head,
.ao3-section__head,
.ao3-thread-card__top,
.ao3-detail__top,
.ao3-profile__head,
.ao3-detail__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ao3-board-card__tag,
.ao3-thread-card__state,
.ao3-detail__state,
.ao3-thread-card__board,
.ao3-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
}

.ao3-board-card__tag,
.ao3-thread-card__state,
.ao3-detail__state {
    background: rgba(143, 107, 168, 0.14);
    color: #734f94;
}

.ao3-thread-card__board,
.ao3-tag {
    background: rgba(240, 230, 247, 0.88);
    color: #60427f;
}

.ao3-thread-list,
.ao3-menu-list,
.ao3-rank-list,
.ao3-comment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ao3-comment-item {
    padding: 14px 16px;
    border: 1px solid rgba(115, 89, 146, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
}

.ao3-comment-item__main {
    display: block;
    width: 100%;
    margin: 0;
    border: 0;
    padding: 0;
    text-align: left;
    font: inherit;
    color: inherit;
    background: transparent;
}

.ao3-comment-item__main--replyable {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.ao3-comment-item__main--replyable:focus-visible {
    outline: 2px solid rgba(125, 88, 175, 0.55);
    outline-offset: 5px;
    border-radius: 10px;
}

.ao3-comment-item__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.ao3-comment-item__author {
    font-size: 14px;
    font-weight: 700;
    color: #332047;
}

.ao3-comment-item__time {
    font-size: 12px;
    color: #8a789b;
}

.ao3-comment-item__body {
    font-size: 14px;
    line-height: 1.7;
    color: #4f3d62;
}

.ao3-comment-item__reply-hint {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    color: #8868a8;
}

.ao3-comment-replies {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    padding-left: 12px;
    border-left: 2px solid rgba(125, 88, 175, 0.16);
}

.ao3-comment-reply {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(245, 239, 250, 0.86);
}

.ao3-comment-reply--user {
    background: rgba(231, 217, 246, 0.72);
}

.ao3-comment-reply__meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 700;
    color: #70568c;
}

.ao3-comment-reply__meta span:last-child {
    flex-shrink: 0;
    font-weight: 400;
    color: #9685a6;
}

.ao3-comment-reply__body {
    font-size: 13px;
    line-height: 1.65;
    color: #4f3d62;
}

.ao3-comment-reply-composer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(115, 89, 146, 0.12);
}

.ao3-comment-reply-composer .ao3-comment-reply-composer__input {
    min-height: 82px;
}

.ao3-comment-reply-composer__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.ao3-comment-reply-composer__actions button {
    min-height: 36px;
}

.ao3-detail__regen-ch {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(115, 89, 146, 0.12);
}

.ao3-detail__regen-ch-btn {
    width: 100%;
    max-width: 100%;
}

.ao3-detail__regen-hint {
    margin: 8px 0 0;
    font-size: 12px;
    line-height: 1.55;
    color: #7a6a8a;
}

.ao3-story-outline-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    padding: 0 0 10px;
    text-align: left;
    font: inherit;
    color: #332047;
    background: transparent;
    cursor: pointer;
}

.ao3-story-outline-trigger span {
    font-size: 15px;
    font-weight: 700;
}

.ao3-story-outline-trigger small {
    font-size: 12px;
    font-weight: 600;
    color: #7d58af;
}

.ao3-story-outline-entry .ao3-page-card__desc {
    margin: 0;
    padding-top: 10px;
    border-top: 1px solid rgba(115, 89, 146, 0.1);
}

.ao3-story-outline-modal .ao3-cp-modal__panel {
    max-width: min(96vw, 440px);
    max-height: min(90vh, 760px);
}

.ao3-story-outline-modal__body {
    padding-top: 12px;
    padding-bottom: 18px;
}

.ao3-story-outline-modal__tools {
    display: flex;
    justify-content: flex-end;
    padding: 8px 18px 0;
}

.ao3-story-outline-modal__tools .ao3-action-btn {
    font-size: 12px;
    padding: 5px 14px;
}

.ao3-story-outline-modal__summary {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 13px;
    font-size: 13px;
    font-weight: 700;
    color: #5c3f76;
    background: rgba(234, 222, 246, 0.72);
}

.ao3-story-outline-modal__lead {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.75;
    color: #5f4d70;
}

.ao3-story-outline-chapter {
    margin-top: 11px;
    padding: 13px 14px;
    border: 1px solid rgba(115, 89, 146, 0.14);
    border-radius: 16px;
    background: rgba(250, 248, 252, 0.92);
}

.ao3-story-outline-chapter h3 {
    margin: 0 0 9px;
    font-size: 14px;
    line-height: 1.5;
    color: #3e2853;
}

.ao3-story-outline-chapter p {
    margin: 0;
    font-size: 13px;
    line-height: 1.8;
    color: #594667;
    white-space: pre-wrap;
}

.ao3-story-outline-chapter p + p {
    margin-top: 9px;
}

.ao3-thread-card__title,
.ao3-rank-item__title,
.ao3-char-card__name {
    margin-top: 10px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    color: #2d1c3c;
}

.ao3-thread-card__cp,
.ao3-detail__cp,
.ao3-thread-card__meta,
.ao3-detail__meta {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.6;
    color: #6d5c80;
}

.ao3-thread-card__tags,
.ao3-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.ao3-link-btn,
.ao3-primary-btn,
.ao3-action-btn {
    min-height: 40px;
    padding: 0 14px;
    font-size: 14px;
    font-weight: 600;
}

.ao3-link-btn,
.ao3-action-btn {
    color: #543973;
}

.ao3-primary-btn {
    border: 0;
    background: linear-gradient(135deg, #9f77c7 0%, #7d58af 100%);
    color: #fff;
}


.ao3-detail__body {
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.9;
    color: #3f3151;
}

.ao3-detail__pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 16px;
}

.ao3-detail__pager--bottom {
    margin-top: 0;
    margin-bottom: 6px;
    padding-top: 4px;
}

.ao3-detail__pager-filler {
    flex: 1;
    min-width: 0;
    min-height: 40px;
}

.ao3-detail__pager .ao3-primary-btn.ao3-detail__pager-main {
    flex: 1;
    min-width: 120px;
}

/* 作品详情：下一章加载（流转圆点）与章节切换过渡 */
.ao3-primary-btn.ao3-detail__pager-main.is-next-ch-busy {
    cursor: wait;
    pointer-events: none;
}

.ao3-next-ch-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 1.25em;
    vertical-align: middle;
}

.ao3-next-ch-dots__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.35;
    animation: ao3-next-ch-dot 1s ease-in-out infinite both;
}

.ao3-next-ch-dots__dot:nth-child(2) {
    animation-delay: 0.2s;
}

.ao3-next-ch-dots__dot:nth-child(3) {
    animation-delay: 0.4s;
}

/* 分区「刷新本区域作品贴」与详情页共用 ao3-next-ch-dots 类名；后者在全局为 inline-flex，会盖掉父级对圆点的隐藏，须提高优先级 */
.ao3-board-refresh:not(.is-loading) .ao3-board-refresh__dots.ao3-next-ch-dots {
    display: none !important;
}

.ao3-board-refresh.is-loading .ao3-board-refresh__dots.ao3-next-ch-dots {
    display: inline-flex !important;
}

.ao3-root__add[hidden] {
    display: none !important;
}

@keyframes ao3-next-ch-dot {
    0%,
    100% {
        opacity: 0.28;
        transform: scale(0.82);
    }
    33% {
        opacity: 1;
        transform: scale(1.05);
    }
    66% {
        opacity: 0.55;
        transform: scale(0.92);
    }
}

.ao3-page--leaving {
    opacity: 0;
    transition: opacity 0.23s ease;
    pointer-events: none;
}

.ao3-page--enter {
    animation: ao3-page-enter 0.4s ease forwards;
}

@keyframes ao3-page-enter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ao3-comment-box,
.ao3-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ao3-textarea {
    width: 100%;
    min-height: 110px;
    border: 1px solid rgba(115, 89, 146, 0.16);
    border-radius: 18px;
    padding: 14px;
    font: inherit;
    color: #3f3151;
    background: rgba(255, 255, 255, 0.96);
    resize: vertical;
    box-sizing: border-box;
}

.ao3-empty {
    border-radius: 22px;
    padding: 28px 18px;
    text-align: center;
    font-size: 14px;
    line-height: 1.7;
    color: #6d5c80;
    background: rgba(255, 255, 255, 0.74);
    border: 1px dashed rgba(115, 89, 146, 0.18);
}

.ao3-profile__avatar-btn {
    flex-shrink: 0;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
}

.ao3-profile__avatar,
.ao3-char-card__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(159, 119, 199, 0.22) 0%, rgba(125, 88, 175, 0.18) 100%);
    color: #5f3e82;
    font-size: 22px;
    font-weight: 700;
}

.ao3-profile__avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ao3-profile__meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.ao3-profile__editable {
    border: 0;
    padding: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
    text-align: left;
    color: #332047;
}

.ao3-profile__editable:active {
    opacity: 0.85;
}

.ao3-profile__userid {
    font-size: 13px;
    font-weight: 500;
    color: #6d5c80;
}

.ao3-profile__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.ao3-profile__stat {
    border-radius: 18px;
    padding: 14px;
    background: rgba(244, 238, 249, 0.82);
    text-align: center;
}

.ao3-profile__stat--editable {
    border: 0;
    cursor: pointer;
    font: inherit;
}

.ao3-profile__stat-num {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #38244e;
}

.ao3-profile__stat-label {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #6d5c80;
}

.ao3-menu-item {
    padding: 16px;
    font-size: 15px;
    font-weight: 600;
    color: #3a2750;
}

.ao3-char-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.ao3-form__block {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ao3-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(143, 107, 168, 0.12);
    border-radius: 999px;
    background: rgba(240, 230, 247, 0.8);
    color: #5d417b;
    font-size: 13px;
    font-weight: 600;
    box-shadow: inset 0 0 0 0 rgba(125, 88, 175, 0);
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.ao3-chip.is-active {
    background: linear-gradient(135deg, rgba(159, 119, 199, 0.28) 0%, rgba(125, 88, 175, 0.22) 100%);
    border-color: rgba(125, 88, 175, 0.52);
    color: #43265f;
    box-shadow: inset 0 0 0 1px rgba(125, 88, 175, 0.18), 0 6px 16px rgba(125, 88, 175, 0.18);
    transform: translateY(-1px);
}

.ao3-chip[data-ao3-custom-trigger] {
    border-style: dashed;
    background: rgba(255, 255, 255, 0.76);
}

.ao3-custom-tag-editor {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 2px;
}

.ao3-custom-tag-editor[hidden] {
    display: none;
}

.ao3-custom-tag-editor input {
    min-width: 0;
    flex: 1;
    height: 36px;
    box-sizing: border-box;
    padding: 0 11px;
    border: 1px solid rgba(115, 89, 146, 0.24);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.96);
    color: #3f3151;
    font: inherit;
    font-size: 13px;
}

.ao3-custom-tag-editor input:focus {
    outline: none;
    border-color: rgba(125, 88, 175, 0.5);
    box-shadow: 0 0 0 3px rgba(125, 88, 175, 0.14);
}

.ao3-custom-tag-editor button {
    flex: none;
    height: 36px;
    padding: 0 10px;
    border: 0;
    border-radius: 10px;
    background: rgba(125, 88, 175, 0.14);
    color: #4f3270;
    font-size: 12px;
    font-weight: 600;
}

.ao3-rank-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ao3-rank-item__index {
    width: 32px;
    font-size: 18px;
    font-weight: 700;
    color: #7f5ea4;
}

.ao3-rank-item__main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.ao3-ws-nested-modal.ao3-modal-overlay {
    z-index: 110;
}

.ao3-modal-overlay {
    position: absolute;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    box-sizing: border-box;
    background: rgba(12, 10, 18, 0.42);
    backdrop-filter: blur(5px);
}

.ao3-modal {
    width: 100%;
    max-width: 300px;
    padding: 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(115, 89, 146, 0.14);
    box-shadow: 0 24px 60px rgba(26, 16, 40, 0.22);
}

.ao3-modal__title {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 700;
    color: #2d1c3c;
}

.ao3-modal__input {
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    border: 1px solid rgba(115, 89, 146, 0.2);
    border-radius: 14px;
    padding: 10px 14px;
    font: inherit;
    font-size: 15px;
    color: #3f3151;
    background: rgba(255, 255, 255, 0.98);
}

.ao3-modal__input:focus {
    outline: none;
    border-color: rgba(125, 88, 175, 0.45);
    box-shadow: 0 0 0 3px rgba(125, 88, 175, 0.18);
}

.ao3-modal__actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    justify-content: stretch;
}

.ao3-modal__actions .ao3-action-btn,
.ao3-modal__actions .ao3-primary-btn {
    flex: 1;
    min-height: 42px;
}

/* CP 设定表弹框（覆盖在 AO3 容器内） */
.ao3-cp-modal {
    position: absolute;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    box-sizing: border-box;
}

.ao3-cp-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 10, 18, 0.48);
    backdrop-filter: blur(4px);
}

.ao3-cp-modal__panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: min(96vw, 400px);
    max-height: min(88vh, 720px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(115, 89, 146, 0.16);
    box-shadow: 0 24px 64px rgba(26, 16, 40, 0.28);
}

.ao3-cp-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 16px 8px;
    border-bottom: 1px solid rgba(115, 89, 146, 0.1);
}

.ao3-cp-modal__title {
    font-size: 17px;
    font-weight: 700;
    color: #2d1c3c;
}

.ao3-cp-modal__x {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 12px;
    background: rgba(116, 89, 150, 0.1);
    color: #4f3a69;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.ao3-cp-modal__sub {
    padding: 8px 16px 0;
    font-size: 13px;
    line-height: 1.5;
    color: #6d5c80;
}

.ao3-cp-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px 8px;
}

.ao3-cp-modal__foot {
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px 16px;
    border-top: 1px solid rgba(115, 89, 146, 0.1);
}

.ao3-cp-modal__foot .ao3-action-btn,
.ao3-cp-modal__foot .ao3-primary-btn {
    flex: 1;
    min-width: 120px;
    min-height: 42px;
}

.ao3-cp-type-modal .ao3-cp-modal__panel {
    max-width: min(92vw, 390px);
    max-height: min(82vh, 560px);
}

.ao3-cp-type-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
    padding-bottom: 18px;
}

.ao3-cp-type-choice {
    width: 100%;
    border: 1px solid rgba(115, 89, 146, 0.16);
    border-radius: 18px;
    padding: 16px;
    text-align: left;
    font: inherit;
    color: #3f3151;
    background: linear-gradient(145deg, rgba(250, 247, 253, 0.98), rgba(239, 230, 248, 0.78));
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.ao3-cp-type-choice:active {
    transform: translateY(1px);
    background: rgba(234, 221, 247, 0.92);
}

.ao3-cp-type-choice strong,
.ao3-cp-type-choice span {
    display: block;
}

.ao3-cp-type-choice strong {
    margin-bottom: 7px;
    font-size: 16px;
    color: #38244e;
}

.ao3-cp-type-choice span {
    font-size: 12.5px;
    line-height: 1.65;
    color: #6d5c80;
}

.ao3-custom-cp-modal .ao3-cp-modal__panel {
    max-width: min(96vw, 430px);
}

.ao3-custom-cp-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ao3-custom-cp-card {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 12px;
    border: 1px solid rgba(115, 89, 146, 0.14);
    border-radius: 15px;
    background: rgba(247, 243, 251, 0.76);
}

.ao3-custom-cp-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    color: #4a355f;
}

.ao3-custom-cp-card__remove,
.ao3-custom-cp-add {
    border: 0;
    border-radius: 10px;
    padding: 7px 10px;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    color: #5b3e78;
    background: rgba(125, 88, 175, 0.12);
    cursor: pointer;
}

.ao3-custom-cp-card__remove {
    color: #8a4962;
    background: rgba(182, 101, 132, 0.11);
}

.ao3-cp-input {
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
    border: 1px solid rgba(115, 89, 146, 0.18);
    border-radius: 13px;
    padding: 9px 12px;
    font: inherit;
    font-size: 14px;
    color: #3f3151;
    background: rgba(255, 255, 255, 0.97);
}

.ao3-cp-input:focus,
.ao3-textarea:focus {
    outline: none;
    border-color: rgba(125, 88, 175, 0.5);
    box-shadow: 0 0 0 3px rgba(125, 88, 175, 0.13);
}

.ao3-textarea.ao3-textarea--compact {
    min-height: 86px;
    border-radius: 13px;
    padding: 11px 12px;
    font-size: 13px;
    line-height: 1.65;
}

.ao3-custom-cp-empty {
    padding: 11px 12px;
    border: 1px dashed rgba(115, 89, 146, 0.18);
    border-radius: 13px;
    font-size: 12px;
    line-height: 1.6;
    color: #7a6b8e;
    background: rgba(250, 248, 252, 0.68);
}

.ao3-form__label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ao3-form__hint--sole {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.45;
    color: #7a6b8e;
}

.ao3-sole-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}

.ao3-sole-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ao3-sole-switch__ui {
    width: 44px;
    height: 26px;
    border-radius: 13px;
    background: rgba(115, 89, 146, 0.22);
    transition: background 0.2s ease;
    position: relative;
}

.ao3-sole-switch__ui::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    top: 2px;
    left: 2px;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.ao3-sole-switch input:checked + .ao3-sole-switch__ui {
    background: rgba(125, 88, 175, 0.55);
}

.ao3-sole-switch input:checked + .ao3-sole-switch__ui::after {
    transform: translateX(18px);
}

.ao3-profile-pref {
    margin-top: 12px;
}

.ao3-profile-pref__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.ao3-profile-pref__text {
    flex: 1 1 auto;
    min-width: 0;
}

.ao3-profile-pref__title {
    font-size: 15px;
    font-weight: 700;
    color: #3a2750;
    margin-bottom: 4px;
}

.ao3-profile-pref__hint {
    font-size: 12.5px;
    line-height: 1.6;
    color: #6d5c80;
}

.ao3-profile-pref__switch {
    flex-shrink: 0;
}

.ao3-sole-panel {
    margin: 0 0 12px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(115, 89, 146, 0.14);
    background: rgba(246, 242, 252, 0.65);
}

.ao3-sole-panel__title {
    font-size: 13px;
    font-weight: 700;
    color: #3f3151;
    margin-bottom: 8px;
}

.ao3-sole-pick {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 6px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #3f3151;
}

.ao3-sole-pick input {
    width: 18px;
    height: 18px;
    accent-color: #7d58af;
    flex-shrink: 0;
}

.ao3-sole-pick__name {
    flex: 1;
    min-width: 0;
}

.ao3-sole-pick__fav {
    font-size: 12px;
    color: #8f6ba8;
    flex-shrink: 0;
}

.ao3-empty--sole {
    padding: 8px 0;
    font-size: 13px;
}

.ao3-cp-list-item__shura {
    display: inline-block;
    margin-right: 4px;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #6b3d5c;
    background: rgba(180, 120, 160, 0.22);
    vertical-align: middle;
}

.ao3-cp-list-item__type {
    display: inline-block;
    margin-right: 4px;
    padding: 2px 7px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    color: #654482;
    background: rgba(143, 107, 168, 0.16);
    vertical-align: middle;
}

.ao3-cp-list-item__source {
    margin-top: 4px;
    font-size: 12px;
    color: #8a719d;
}

.ao3-cp-select {
    width: 100%;
    margin-top: 6px;
    box-sizing: border-box;
    min-height: 44px;
    border: 1px solid rgba(115, 89, 146, 0.22);
    border-radius: 14px;
    padding: 10px 14px;
    font: inherit;
    font-size: 15px;
    color: #3f3151;
    background: rgba(255, 255, 255, 0.98);
}

.ao3-cp-form-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ao3-cp-list-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(115, 89, 146, 0.12);
    background: rgba(255, 255, 255, 0.88);
}

.ao3-cp-list-item__text {
    flex: 1 1 auto;
    min-width: 0;
}

.ao3-cp-list-item__title {
    font-weight: 700;
    font-size: 15px;
    color: #2d1c3c;
    overflow-wrap: anywhere;
}

.ao3-cp-list-item__len {
    font-weight: 600;
    font-size: 11px;
    color: #5c4a72;
    margin-right: 4px;
}

.ao3-cp-list-item__boards {
    font-weight: 500;
    font-size: 12px;
    color: #8f6ba8;
}

.ao3-cp-list-item__desc {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.5;
    color: #6d5c80;
}

.ao3-cp-list-item__btns {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
    touch-action: manipulation;
}

.ao3-cp-edit-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(116, 89, 150, 0.2);
}

.ao3-char-card--static {
    cursor: default;
    opacity: 0.92;
    pointer-events: none;
}

.ao3-writing-style-modal__panel {
    max-height: min(88vh, 560px);
}

.ao3-writing-style-modal__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ao3-writing-style-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(115, 89, 146, 0.22);
    background: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    color: #3a2f4d;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.ao3-writing-style-row:hover {
    border-color: rgba(115, 89, 146, 0.45);
}

.ao3-writing-style-row.is-selected {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.12);
    box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.25);
}

.ao3-writing-style-row__main {
    flex: 1;
    min-width: 0;
    font-weight: 600;
}

.ao3-writing-style-row__badge {
    flex-shrink: 0;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(115, 89, 146, 0.12);
    color: #6d5c80;
}

.ao3-writing-style-row__check {
    flex-shrink: 0;
    width: 22px;
    text-align: center;
    font-weight: 700;
    color: #7c3aed;
}

.ao3-writing-style-empty {
    padding: 12px 4px;
}

.ao3-writing-style-modal__foot {
    flex-wrap: wrap;
}

.ao3-writing-style-modal__foot .ao3-primary-btn {
    flex: 2 1 140px;
}

.ao3-writing-styles-intro {
    margin: 0 0 12px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.55;
    color: #5b4a6e;
    background: rgba(115, 89, 146, 0.08);
    border-radius: 10px;
}

.ao3-writing-styles-page .ao3-writing-styles-new {
    width: 100%;
    margin-bottom: 12px;
}

.ao3-writing-styles-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.ao3-ws-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(115, 89, 146, 0.2);
    background: rgba(255, 255, 255, 0.85);
}

.ao3-ws-item__pick {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #4a3d5c;
    cursor: pointer;
    user-select: none;
}

.ao3-ws-item__pick input {
    width: 18px;
    height: 18px;
    accent-color: #7c3aed;
}

.ao3-ws-item__main {
    flex: 1;
    min-width: 140px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ao3-ws-item__name {
    font-weight: 600;
    color: #2d2438;
}

.ao3-tag--user {
    opacity: 0.9;
    background: rgba(124, 58, 237, 0.15);
    color: #5b21b6;
}

.ao3-ws-item__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ao3-ws-item__actions .ao3-action-btn {
    padding: 6px 12px;
    min-height: 36px;
    font-size: 13px;
}

.ao3-writing-styles-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(115, 89, 146, 0.12);
}

.ao3-writing-styles-foot .ao3-primary-btn {
    flex: 2 1 160px;
}

.ao3-writing-styles-foot .ao3-action-btn {
    flex: 1 1 100px;
    min-height: 42px;
}

.ao3-ws-nested-modal__panel.ao3-ws-new-modal {
    max-width: min(96vw, 420px);
    max-height: min(90vh, 520px);
    overflow-y: auto;
}

.ao3-ws-nested-hint {
    margin: 0 0 10px;
    font-size: 12px;
    color: #6d5c80;
}

/* 作品卡长按删除：内嵌确认层（WebView 内 window.confirm 常被屏蔽或不可靠） */
.ao3-confirm-overlay {
    position: absolute;
    inset: 0;
    z-index: 20050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    background: rgba(12, 10, 18, 0.45);
    backdrop-filter: blur(2px);
}

.ao3-confirm-box {
    width: 100%;
    max-width: 300px;
    border-radius: 20px;
    padding: 18px 16px 14px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(115, 89, 146, 0.2);
    box-shadow: 0 18px 48px rgba(26, 16, 40, 0.25);
}

.ao3-confirm-box__msg {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.55;
    color: #3f3151;
    text-align: center;
}

.ao3-confirm-box__row {
    display: flex;
    gap: 10px;
    justify-content: stretch;
}

.ao3-confirm-box__btn {
    flex: 1;
    min-height: 42px;
    border-radius: 14px;
    border: 0;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.ao3-confirm-box__btn--cancel {
    background: rgba(116, 89, 150, 0.12);
    color: #4f3a69;
}

.ao3-confirm-box__btn--ok {
    background: linear-gradient(135deg, #9f77c7 0%, #7d58af 100%);
    color: #fff;
}

@keyframes ao3-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ===== 我发布的（作者后台式） ===== */

.ao3-pub-head__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ao3-pub-head__name {
    font-size: 17px;
    font-weight: 700;
    color: #2d1c3c;
}

.ao3-pub-head__sub {
    margin-top: 4px;
    font-size: 12px;
    color: #8a789b;
}

.ao3-pub-head__add {
    flex-shrink: 0;
    border-radius: 999px;
}

.ao3-pub-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(115, 89, 146, 0.1);
}

.ao3-pub-stats__item {
    text-align: center;
}

.ao3-pub-stats__num {
    display: block;
    font-size: 17px;
    font-weight: 700;
    color: #38244e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ao3-pub-stats__label {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #6d5c80;
}

.ao3-pub-section-title {
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 700;
    color: #332047;
}

.ao3-pub-list {
    display: flex;
    flex-direction: column;
}

.ao3-pub-row {
    padding: 12px 2px;
    border-bottom: 1px solid rgba(115, 89, 146, 0.1);
}

.ao3-pub-row:last-child {
    border-bottom: 0;
    padding-bottom: 4px;
}

.ao3-pub-row__main {
    cursor: pointer;
}

.ao3-pub-row__title-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.ao3-pub-row__title {
    font-size: 15px;
    font-weight: 700;
    color: #2d1c3c;
    line-height: 1.4;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.ao3-pub-row__state {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(143, 107, 168, 0.14);
    color: #734f94;
}

.ao3-pub-row__state--serial {
    background: rgba(94, 160, 122, 0.16);
    color: #3b7a56;
}

.ao3-pub-row__state--draft {
    background: rgba(148, 138, 120, 0.16);
    color: #7a6c4e;
}

.ao3-pub-row__state--ai {
    background: rgba(107, 128, 197, 0.15);
    color: #4a5da8;
}

.ao3-pub-row__meta {
    margin-top: 6px;
    font-size: 12px;
    color: #8a789b;
}

.ao3-pub-row__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.ao3-pub-row__tags .ao3-tag {
    min-height: 22px;
    font-size: 11px;
}

.ao3-pub-row__actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.ao3-pub-row__btn {
    min-height: 30px;
    padding: 0 14px;
    border: 1px solid rgba(125, 88, 175, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: #5d417b;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.ao3-pub-row__btn--danger {
    border-color: rgba(191, 90, 100, 0.3);
    color: #a84a55;
}

/* ===== 编辑作品：标签 / 文风 / 章节 / AI 续写 ===== */

.ao3-chip--ghost {
    background: rgba(255, 255, 255, 0.7);
    border-style: dashed;
    border-color: rgba(125, 88, 175, 0.4);
    color: #7d58af;
}

.ao3-form-tag-wrap {
    position: relative;
    display: inline-flex;
}

.ao3-form-tag-del {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    border: 0;
    border-radius: 50%;
    background: rgba(168, 74, 85, 0.85);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ao3-form-chapter {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    margin-bottom: 12px;
    border: 1px solid rgba(115, 89, 146, 0.14);
    border-radius: 18px;
    background: rgba(250, 247, 253, 0.8);
}

.ao3-form-chapter__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ao3-form-chapter__no {
    font-size: 13px;
    font-weight: 700;
    color: #5d417b;
}

.ao3-form-chapter__remove {
    border: 0;
    background: none;
    color: #a84a55;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 6px;
}

.ao3-form-chapter__head-btns {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ao3-form-chapter__ai {
    border: 1px solid rgba(125, 88, 175, 0.35);
    border-radius: 12px;
    background: rgba(159, 119, 199, 0.12);
    color: #7d58af;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 10px;
}

.ao3-form-chapter__ai:disabled {
    opacity: 0.55;
    cursor: default;
}

.ao3-form-ai-assist {
    margin-top: 8px;
}

.ao3-form-ai-assist:disabled {
    opacity: 0.55;
    cursor: default;
}

/* 新建作品「引用CP表」弹层 */
.ao3-cpref-modal {
    max-height: min(80vh, 480px);
    overflow-y: auto;
}

.ao3-cpref-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 4px 0 12px;
    max-height: 300px;
    overflow-y: auto;
}

.ao3-cpref-item {
    text-align: left;
    border: 1px solid rgba(115, 89, 146, 0.18);
    border-radius: 14px;
    padding: 10px 12px;
    background: rgba(248, 245, 252, 0.92);
    font: inherit;
    cursor: pointer;
}

.ao3-cpref-item:hover {
    border-color: rgba(125, 88, 175, 0.45);
    background: rgba(240, 232, 250, 0.95);
}

.ao3-cpref-item__title {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #2d1c3c;
}

.ao3-cpref-item__type {
    display: inline-block;
    margin-right: 4px;
    padding: 1px 6px;
    border-radius: 8px;
    background: rgba(125, 88, 175, 0.14);
    color: #7d58af;
    font-size: 11px;
    font-weight: 600;
    vertical-align: middle;
}

.ao3-cpref-item__meta {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: #7d6f92;
}

.ao3-cpref-item__desc {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.5;
    color: #5f5375;
}

.ao3-cpref-empty {
    margin: 4px 0 12px;
    font-size: 13px;
    line-height: 1.6;
    color: #7d6f92;
}

.ao3-form-add-chapter {
    width: 100%;
    border-style: dashed;
}

.ao3-form-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.ao3-form-toggle input[type='checkbox'] {
    width: 18px;
    height: 18px;
    accent-color: #7d58af;
}

.ao3-form-toggle__label {
    font-size: 14px;
    font-weight: 700;
    color: #3a2750;
}

.ao3-form__hint {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: #8a789b;
}

.ao3-form-ai-outline {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

/* 详情页：等待作者更新的提示 */
.ao3-detail__pager-hint {
    flex: 1;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 6px 12px;
    border-radius: 18px;
    background: rgba(240, 230, 247, 0.7);
    font-size: 12px;
    line-height: 1.5;
    color: #6d5c80;
    text-align: center;
}

/* ============ 作品卡片：晋江式迷你封面 + 虚拟作者名 ============ */

.ao3-thread-card--cover {
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.ao3-thread-card--cover .ao3-thread-card__main {
    flex: 1;
    min-width: 0;
    display: block;
}

.ao3-thread-card--cover .ao3-thread-card__top,
.ao3-thread-card--cover .ao3-thread-card__tags {
    display: flex;
}

.ao3-thread-card--cover .ao3-thread-card__title,
.ao3-thread-card--cover .ao3-thread-card__cp,
.ao3-thread-card--cover .ao3-thread-card__meta,
.ao3-thread-card--cover .ao3-thread-card__author {
    display: block;
}

.ao3-mini-cover {
    position: relative;
    flex: 0 0 74px;
    width: 74px;
    min-height: 104px;
    align-self: flex-start;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px 6px 8px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 6px 16px rgba(39, 22, 57, 0.18);
}

/* 书脊高光：模拟实体封面 */
.ao3-mini-cover__deco {
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.08));
}

.ao3-mini-cover__title {
    writing-mode: vertical-rl;
    max-height: 72px;
    overflow: hidden;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 3px;
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 1px 4px rgba(31, 17, 48, 0.35);
}

.ao3-mini-cover__author {
    margin-top: auto;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 10px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 3px rgba(31, 17, 48, 0.35);
}

.ao3-thread-card__author {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.5;
    color: #8a6fa8;
}

/* 详情页作者行 */
.ao3-detail__author-line {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.6;
    color: #8a6fa8;
}

/* ============ CP 设定表「AI协助」按钮 ============ */

.ao3-ai-assist-btn {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 4px 12px;
    border: 1px solid rgba(125, 88, 175, 0.35);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(159, 119, 199, 0.16) 0%, rgba(125, 88, 175, 0.16) 100%);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    color: #6b4a94;
    cursor: pointer;
}

.ao3-ai-assist-btn:disabled,
.ao3-ai-assist-btn.is-loading {
    opacity: 0.62;
    cursor: default;
}

/* ============ 详情页「前情总结」按钮（作者有话说右侧） ============ */

.ao3-detail__note-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ao3-detail__note-head .ao3-story-outline-trigger {
    flex: 1;
    min-width: 0;
}

.ao3-plot-summary-btn {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 4px 12px;
    border: 1px solid rgba(125, 88, 175, 0.35);
    border-radius: 999px;
    background: rgba(240, 230, 247, 0.88);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    color: #6b4a94;
    cursor: pointer;
}

/* ============ 通用输入弹层（作者笔名 / 前情总结编辑） ============ */

.ao3-prompt-box {
    max-width: 340px;
}

.ao3-prompt-box--multiline {
    max-width: 480px;
}

.ao3-prompt-box__title {
    margin-bottom: 8px;
}

.ao3-prompt-box__desc {
    margin: 0 0 12px;
    font-size: 12px;
    line-height: 1.6;
    color: #8a789b;
    text-align: center;
}

.ao3-prompt-box__field {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 14px;
    padding: 10px 12px;
    border: 1px solid rgba(115, 89, 146, 0.24);
    border-radius: 12px;
    background: rgba(250, 247, 253, 0.9);
    font: inherit;
    font-size: 14px;
    line-height: 1.6;
    color: #3f3151;
}

.ao3-prompt-box__field--area {
    min-height: 220px;
    max-height: 46vh;
    resize: vertical;
    overflow: auto;
}

/* ============ 作品主页（晋江式书籍详情） ============ */

.ao3-mini-cover--lg {
    flex: 0 0 112px;
    width: 112px;
    min-height: 158px;
    border-radius: 12px;
    padding: 14px 8px 10px;
}

.ao3-mini-cover--lg .ao3-mini-cover__title {
    max-height: 118px;
    font-size: 17px;
    letter-spacing: 4px;
}

.ao3-mini-cover--lg .ao3-mini-cover__author {
    font-size: 11px;
}

.ao3-wh-hero__row {
    display: flex;
    align-items: stretch;
    gap: 14px;
}

.ao3-wh-hero__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.ao3-wh-hero__title {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.4;
    color: #2d1c3c;
}

.ao3-wh-hero__author {
    margin-top: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #7d58af;
}

.ao3-wh-hero__author-suffix {
    font-size: 12px;
    font-weight: 400;
    color: #8a789b;
}

.ao3-wh-hero__cp {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.5;
    color: #6d5c80;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ao3-wh-hero__state-line {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ao3-wh-state {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(143, 107, 168, 0.14);
    color: #734f94;
}

.ao3-wh-state--done {
    background: rgba(95, 174, 154, 0.16);
    color: #35755f;
}

.ao3-wh-state--draft {
    background: rgba(176, 92, 92, 0.14);
    color: #93504f;
}

.ao3-wh-hero__ch-count {
    font-size: 12px;
    color: #8a789b;
}

.ao3-wh-hero__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.ao3-wh-chip--orient {
    background: rgba(125, 88, 175, 0.16);
    color: #5f3f8c;
    font-weight: 700;
}

.ao3-wh-stats {
    display: flex;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed rgba(115, 89, 146, 0.18);
}

.ao3-wh-stats__item {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.ao3-wh-stats__num {
    font-size: 14px;
    font-weight: 800;
    color: #3a2750;
    white-space: nowrap;
}

.ao3-wh-stats__label {
    font-size: 11px;
    color: #8a789b;
}

.ao3-wh-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.ao3-wh-actions__read {
    flex: 1.6;
    min-width: 0;
}

.ao3-wh-actions .ao3-action-btn {
    flex: 1;
    min-width: 0;
}

/* 简介：默认收拢 5 行，可展开 */
.ao3-wh-synopsis__text {
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.8;
    color: #4a3a5e;
    white-space: normal;
}

.ao3-wh-synopsis__text.is-clamped {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
}

.ao3-wh-synopsis__more {
    margin-top: 8px;
    font-size: 13px;
    color: #7d58af;
}

/* 章节目录 */
.ao3-wh-directory__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ao3-wh-directory__count {
    margin-left: 8px;
    font-size: 12px;
    font-weight: 400;
    color: #8a789b;
}

.ao3-wh-order-btn {
    flex: 0 0 auto;
    min-height: 28px;
    padding: 2px 12px;
    border: 1px solid rgba(125, 88, 175, 0.3);
    border-radius: 999px;
    background: rgba(240, 230, 247, 0.7);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    color: #6b4a94;
    cursor: pointer;
}

.ao3-wh-ch-list {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
}

.ao3-wh-ch-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 4px;
    border: 0;
    border-bottom: 1px solid rgba(115, 89, 146, 0.1);
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.ao3-wh-ch-row:last-child {
    border-bottom: 0;
}

.ao3-wh-ch-row:active {
    background: rgba(240, 230, 247, 0.55);
}

.ao3-wh-ch-row__idx {
    flex: 0 0 30px;
    font-size: 13px;
    font-weight: 700;
    color: #9f77c7;
    text-align: center;
}

.ao3-wh-ch-row__main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ao3-wh-ch-row__title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: #3a2750;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ao3-wh-ch-row__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #8a789b;
}

.ao3-wh-ch-row__badge {
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(125, 88, 175, 0.14);
    font-size: 10px;
    font-weight: 600;
    color: #6b4a94;
}

.ao3-wh-ch-row__badge--read {
    background: rgba(95, 174, 154, 0.16);
    color: #35755f;
}

.ao3-wh-ch-row__arrow {
    flex: 0 0 auto;
    font-size: 16px;
    color: #b8a6cc;
}

/* ============ 我发布的：可编辑作者笔名 ============ */

.ao3-pub-head__name--editable {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 17px;
    font-weight: 700;
    color: #2d1c3c;
    cursor: pointer;
    text-align: left;
}

.ao3-pub-head__pen-icon {
    font-size: 13px;
    color: #9f77c7;
}
