/* 贴合 #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;
    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__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-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-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-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-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-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-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__title {
    font-weight: 700;
    font-size: 15px;
    color: #2d1c3c;
}

.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);
    }
}
