/* ==========================================================================
   漫屿 MANYU · 公共组件
   按钮 / 标签 / 面板 / 标题 / 书卡 / 榜单 / 表单 / 页签 / 用户 / 文档 / 阅读器
   ========================================================================== */

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 40px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: var(--r);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn .icon { font-size: 15px; }

.btn--solid { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn--solid:hover { background: var(--brand-d); border-color: var(--brand-d); }

.btn--line { background: transparent; border-color: var(--line-2); color: var(--ink-2); }
.btn--line:hover { border-color: var(--brand); color: var(--brand); background: var(--card); }

.btn--soft { background: var(--brand-soft); border-color: var(--brand-soft); color: var(--brand); }
.btn--soft:hover { background: #dfe5fa; }

.btn--coral { background: var(--coral); border-color: var(--coral); color: #fff; }
.btn--coral:hover { background: #c8462c; border-color: #c8462c; }

.btn--lg { height: 46px; padding: 0 26px; font-size: 14.5px; }
.btn--sm { height: 32px; padding: 0 13px; font-size: 12.5px; }
.btn--block { width: 100%; }
.btn--ico { width: 40px; padding: 0; }

/* ---------- 标签 ---------- */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 22px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: var(--card);
    color: var(--ink-3);
    font-size: 11.5px;
    line-height: 1;
    white-space: nowrap;
}
.tag--brand { background: var(--brand-soft); border-color: transparent; color: var(--brand); }
.tag--coral { background: var(--coral-soft); border-color: transparent; color: var(--coral); }
.tag--gold { background: #f7edd4; border-color: transparent; color: var(--gold); }
.tag--line { background: transparent; border-color: var(--line-2); }
.tag--deep { background: var(--deep); border-color: var(--deep); color: #f5efe2; }

/* ---------- 面板 ---------- */
.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r);
}
.panel__hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}
.panel__hd h3 {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 16px;
}
.panel__hd h3 em {
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: .18em;
    color: var(--ink-3);
    text-transform: uppercase;
}
.panel__hd a { color: var(--ink-3); font-size: 12px; }
.panel__hd a:hover { color: var(--brand); }

/* ---------- 板块标题 ---------- */
.sec { margin-top: 38px; }
.sec:first-child { margin-top: 0; }

.sec__hd {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding-bottom: 11px;
    border-bottom: 1px solid var(--line);
}
.sec__t {
    display: flex;
    align-items: baseline;
    gap: 12px;
}
.sec__t h2 {
    position: relative;
    padding-left: 14px;
    font-size: 23px;
    line-height: 1.2;
}
.sec__t h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 2px;
    width: 3px;
    background: var(--coral);
}
.sec__t em {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: .2em;
    color: var(--ink-3);
    text-transform: uppercase;
}
.sec__more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--ink-3);
    font-size: 12.5px;
    padding-bottom: 3px;
}
.sec__more:hover { color: var(--brand); }
.sec__more .icon { font-size: 13px; }

/* ---------- 书卡 ---------- */
.newgrid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px 18px;
}

.bcard { display: block; min-width: 0; }

.bcard__pic {
    display: block;
    position: relative;
    aspect-ratio: 3 / 4;
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
    background: #e8e1d3;
}
.bcard__pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}
.bcard:hover .bcard__pic img { transform: scale(1.035); }
.bcard__pic::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20, 22, 34, 0) 55%, rgba(20, 22, 34, .62) 100%);
    opacity: .75;
    pointer-events: none;
}
.bcard__flag {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    padding: 3px 7px;
    background: var(--deep);
    color: #f5efe2;
    font-size: 10.5px;
    line-height: 1.5;
    letter-spacing: .06em;
    border-radius: var(--r) 0 6px 0;
}
.bcard__flag:empty { display: none; }
.bcard__score {
    position: absolute;
    right: 7px;
    bottom: 7px;
    z-index: 1;
    color: #fff;
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: .04em;
}
.bcard__body { display: block; padding-top: 9px; }
.bcard__t {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    transition: color .18s ease;
}
.bcard:hover .bcard__t { color: var(--brand); }
.bcard__s {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--ink-3);
    font-size: 11.5px;
}
.bcard__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 5px;
    color: var(--ink-3);
    font-size: 11px;
}
.bcard__foot b { color: var(--ink-2); font-weight: 500; }

/* ---------- 列表行 ---------- */
.booklist { border-top: 1px solid var(--line); }

.brow {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 18px 16px 18px 14px;
    border-bottom: 1px solid var(--line);
    background: transparent;
    transition: background .18s ease;
}
.brow:hover { background: var(--card); }

.brow__pic {
    flex: none;
    width: 92px;
    aspect-ratio: 3 / 4;
    border: 1px solid var(--line);
    border-radius: 3px;
    overflow: hidden;
    background: #e8e1d3;
}
.brow__pic img { width: 100%; height: 100%; object-fit: cover; }

.brow__body { flex: 1; min-width: 0; padding-top: 1px; }

.brow__t {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.brow__t b {
    font-family: var(--serif);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: .01em;
}
.brow:hover .brow__t b { color: var(--brand); }

.brow__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin-top: 5px;
    color: var(--ink-3);
    font-size: 12px;
}
.brow__meta i { color: var(--ink-2); }
.brow__meta b { color: var(--gold); }

.brow__desc {
    display: block;
    margin-top: 7px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--ink-3);
    font-size: 12.5px;
    line-height: 1.75;
}

.brow__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 9px;
}
.brow__chap {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--ink-3);
    font-size: 12px;
}
.brow__chap b { color: var(--ink-2); font-weight: 500; }
.brow__foot .btn { flex: none; }

/* ---------- 榜单行 ---------- */
.ranklist { padding: 4px 0; }

.rankline {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    transition: background .18s ease;
}
.rankline:hover { background: var(--card-2); }
.rankline__no {
    flex: none;
    width: 30px;
    color: var(--line-2);
    font-family: var(--mono);
    font-size: 17px;
    line-height: 1;
    letter-spacing: .03em;
}
.rankline:nth-child(1) .rankline__no,
.rankline:nth-child(2) .rankline__no,
.rankline:nth-child(3) .rankline__no { color: var(--coral); }
.rankline__pic {
    flex: none;
    width: 44px;
    aspect-ratio: 3 / 4;
    border-radius: 2px;
    overflow: hidden;
    background: #e8e1d3;
}
.rankline__pic img { width: 100%; height: 100%; object-fit: cover; }
.rankline__body { flex: 1; min-width: 0; }
.rankline__t {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 13.5px;
    font-weight: 600;
}
.rankline:hover .rankline__t { color: var(--brand); }
.rankline__s {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--ink-3);
    font-size: 11.5px;
}
.rankline__val {
    flex: none;
    text-align: right;
    color: var(--ink-3);
    font-size: 10.5px;
}
.rankline__val b {
    display: block;
    color: var(--ink-2);
    font-family: var(--mono);
    font-size: 13px;
    font-weight: 600;
}

/* ---------- 页签 ---------- */
.tabs {
    display: flex;
    align-items: center;
    gap: 22px;
}
.tabs__item {
    position: relative;
    padding: 3px 0 9px;
    color: var(--ink-3);
    font-size: 14px;
    font-weight: 600;
}
.tabs__item:hover { color: var(--ink); }
.tabs__item.is-active { color: var(--ink); }
.tabs__item.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--coral);
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 29px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: var(--card);
    color: var(--ink-2);
    font-size: 12px;
    transition: all .16s ease;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip .icon { font-size: 13px; color: var(--ink-3); }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field__label {
    display: block;
    margin-bottom: 6px;
    color: var(--ink-2);
    font-size: 12.5px;
    font-weight: 600;
}
.field__label i { color: var(--coral); }

.input {
    width: 100%;
    height: 42px;
    padding: 0 13px;
    background: var(--card);
    border: 1px solid var(--line-2);
    border-radius: var(--r);
    color: var(--ink);
    font-size: 13.5px;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease;
}
.input::placeholder { color: #b3aa9a; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.input-group { display: flex; align-items: center; gap: 9px; }
.input-group .input { flex: 1; }
.input-group img { height: 42px; width: 104px; object-fit: cover; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; }

select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px; background-size: 5px 5px; background-repeat: no-repeat; }

/* ---------- 筛选条 ---------- */
.filters {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 4px 18px;
    margin-bottom: 20px;
}
.filter-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px dashed var(--line);
}
.filter-row:last-child { border-bottom: 0; }
.filter-row__label {
    flex: none;
    width: 52px;
    padding-top: 3px;
    color: var(--ink-3);
    font-size: 12px;
    letter-spacing: .06em;
}
.filter-row__list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 2px;
}
.filter-row__list a {
    padding: 3px 11px;
    border-radius: 2px;
    color: var(--ink-2);
    font-size: 12.5px;
    line-height: 1.6;
    transition: all .15s ease;
}
.filter-row__list a:hover { color: var(--brand); }
.filter-row__list a.on { background: var(--brand); color: #fff; }

/* ---------- 用户中心 ---------- */
.uhero {
    position: relative;
    overflow: hidden;
    padding: 26px 26px 24px;
    background: var(--deep);
    border-radius: var(--r);
    color: #f2ecdd;
}
.uhero::before {
    content: "MANYU";
    position: absolute;
    right: 22px;
    bottom: -26px;
    font-family: var(--serif);
    font-size: 108px;
    font-weight: 800;
    letter-spacing: .04em;
    color: rgba(255, 255, 255, .045);
    pointer-events: none;
}
.uhero::after {
    content: "";
    position: absolute;
    right: 26px;
    top: -60px;
    width: 220px;
    height: 220px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 50%;
    pointer-events: none;
}
.uhero__in { position: relative; z-index: 1; display: flex; align-items: center; gap: 18px; }
.uhero__ava {
    flex: none;
    width: 68px;
    height: 68px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    overflow: hidden;
    background: #2a2f45;
}
.uhero__ava img { width: 100%; height: 100%; object-fit: cover; }
.uhero__info { flex: 1; min-width: 0; }
.uhero__name {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #fff;
    font-family: var(--serif);
    font-size: 23px;
    font-weight: 800;
}
.uhero__desc { margin-top: 4px; color: rgba(242, 236, 221, .58); font-size: 12px; }
.uhero__stat { display: flex; gap: 34px; flex: none; }
.uhero__stat b {
    display: block;
    color: #ffd36e;
    font-family: var(--mono);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.2;
}
.uhero__stat span { color: rgba(242, 236, 221, .55); font-size: 11.5px; }

.usernav {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 14px 0 20px;
    padding: 5px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow-x: auto;
}
.usernav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: none;
    height: 34px;
    padding: 0 14px;
    border-radius: 2px;
    color: var(--ink-2);
    font-size: 12.5px;
    white-space: nowrap;
    transition: all .16s ease;
}
.usernav a .icon { font-size: 14px; color: var(--ink-3); }
.usernav a:hover { background: var(--card-2); color: var(--brand); }
.usernav a.on { background: var(--deep); color: #f2ecdd; }
.usernav a.on .icon { color: #ffd36e; }

.ustat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.ustat {
    position: relative;
    padding: 18px 18px 16px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
}
.ustat::after {
    content: "";
    position: absolute;
    right: -18px;
    bottom: -18px;
    width: 58px;
    height: 58px;
    border: 1px solid var(--line);
    border-radius: 50%;
}
.ustat__label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--ink-3);
    font-size: 12px;
}
.ustat__label .icon { font-size: 14px; color: var(--coral); }
.ustat__num {
    margin-top: 9px;
    font-family: var(--mono);
    font-size: 26px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--ink);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.u-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r);
}
.u-card__hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 18px;
    border-bottom: 1px solid var(--line);
}
.u-card__hd h2 { font-size: 17px; }
.u-card__hd h2 em {
    margin-left: 9px;
    font-family: var(--mono);
    font-size: 10.5px;
    font-weight: 400;
    letter-spacing: .1em;
    color: var(--ink-3);
}
.u-card__bd { padding: 18px; }
.u-card__bd--flush { padding: 0; }

.utool-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.utool {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--card-2);
    transition: all .18s ease;
}
.utool:hover { border-color: var(--brand); background: var(--brand-soft); }
.utool__ico {
    flex: none;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--card);
    border: 1px solid var(--line);
    color: var(--brand);
}
.utool__ico .icon { font-size: 16px; }
.utool b { display: block; font-size: 13.5px; }
.utool span span { display: block; margin-top: 2px; color: var(--ink-3); font-size: 11.5px; }

.uhist__row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--line);
}
.uhist__row:last-child { border-bottom: 0; }
.uhist__pic {
    flex: none;
    width: 44px;
    aspect-ratio: 3 / 4;
    border-radius: 2px;
    overflow: hidden;
    background: #e8e1d3;
}
.uhist__pic img { width: 100%; height: 100%; object-fit: cover; }
.uhist__body { flex: 1; min-width: 0; }
.uhist__t { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13.5px; font-weight: 600; }
.uhist__t:hover { color: var(--brand); }
.uhist__s { margin-top: 2px; color: var(--ink-3); font-size: 11.5px; }

/* ---------- 登录 / 注册 ---------- */
.auth {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 300px);
    padding: 48px 22px 62px;
}
.auth__box {
    width: 460px;
    max-width: 100%;
    padding: 34px 38px 30px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 28px 60px -40px rgba(40, 34, 20, .45);
}
.auth__logo { margin-bottom: 20px; }
.auth__logo img { height: 34px; }
.auth__t { font-size: 25px; }
.auth__s { margin-top: 5px; color: var(--ink-3); font-size: 12.5px; }
.auth__form { margin-top: 24px; }
.auth__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px dashed var(--line);
    color: var(--ink-3);
    font-size: 12.5px;
}
.auth__foot a { color: var(--brand); }
.auth__tip {
    margin-top: 14px;
    color: var(--ink-3);
    font-size: 11.5px;
    line-height: 1.85;
}
.auth__tip a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.auth__agree {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: 4px 0 16px;
    color: var(--ink-3);
    font-size: 12px;
    line-height: 1.7;
}
.auth__agree input { margin-top: 3px; accent-color: var(--brand); }
.auth__agree a { color: var(--brand); }

/* ---------- 文档页 ---------- */
.doc-hero {
    padding: 34px 34px 30px;
    background: var(--deep);
    border-radius: var(--r);
    color: #f2ecdd;
    margin-bottom: 26px;
}
.doc-hero h1 { color: #fff; font-size: 32px; }
.doc-hero p { margin-top: 8px; color: rgba(242, 236, 221, .66); font-size: 13px; }
.doc-hero .tag { margin-top: 15px; background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .18); color: #ffd36e; }

.doc-grid {
    display: grid;
    grid-template-columns: 208px minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}
.doc-side {
    position: sticky;
    top: 88px;
    padding: 16px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r);
}
.doc-side h3 {
    margin-bottom: 10px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-3);
    font-family: var(--mono);
    font-size: 10.5px;
    font-weight: 400;
    letter-spacing: .16em;
}
.doc-side a {
    display: block;
    padding: 7px 9px;
    border-radius: 2px;
    color: var(--ink-2);
    font-size: 12.5px;
}
.doc-side a:hover { background: var(--card-2); color: var(--brand); }
.doc-side a.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }

.doc-body {
    padding: 32px 36px 38px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r);
}
.doc-body h2 {
    margin: 30px 0 12px;
    padding-left: 12px;
    border-left: 3px solid var(--coral);
    font-size: 20px;
}
.doc-body h2:first-child { margin-top: 0; }
.doc-body h3 { margin: 22px 0 9px; font-size: 16px; }
.doc-body p { color: var(--ink-2); font-size: 13.5px; line-height: 2; }
.doc-body ul { margin: 10px 0 0; padding-left: 2px; }
.doc-body li {
    position: relative;
    padding-left: 16px;
    color: var(--ink-2);
    font-size: 13.5px;
    line-height: 2;
}
.doc-body li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 13px;
    width: 5px;
    height: 5px;
    background: var(--coral);
}
.doc-body a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.doc-updated { margin-top: 28px; padding-top: 14px; border-top: 1px dashed var(--line); color: var(--ink-3) !important; font-size: 12px !important; }

/* ---------- 阅读器 ---------- */
.reader-page { background: #14161f; }
.reader-page .mast,
.reader-page .ticker,
.reader-page .foot,
.reader-page .totop { display: none; }

.rd-top {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(20, 22, 31, .94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    color: #e9e3d6;
}
.rd-top__in {
    display: flex;
    align-items: center;
    gap: 18px;
    height: 56px;
}
.rd-top__back { display: inline-flex; align-items: center; gap: 5px; color: #b9b3a6; font-size: 12.5px; }
.rd-top__back:hover { color: #fff; }
.rd-top__t { flex: 1; min-width: 0; }
.rd-top__t b { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; }
.rd-top__t span { display: block; color: #8f897c; font-size: 11.5px; }
.rd-top__ops { display: flex; gap: 8px; }
.rd-top__ops .btn { color: #cfc8ba; border-color: rgba(255, 255, 255, .16); background: transparent; }
.rd-top__ops .btn:hover { color: #fff; border-color: rgba(255, 255, 255, .4); }
.rd-progress { height: 2px; background: rgba(255, 255, 255, .08); }
.rd-progress b { display: block; width: 0; height: 100%; background: var(--coral); transition: width .12s linear; }

.rd-wrap { padding: 0 0 30px; }
.comic-pages { width: 820px; max-width: 100%; margin: 0 auto; padding: 22px 0 0; }
.comic-page { margin-bottom: 2px; background: #1d202b; min-height: 60px; }
.comic-page img { display: block; width: 100%; height: auto; }

.rd-article__down {
    width: 720px;
    max-width: calc(100% - 40px);
    margin: 40px auto;
    padding: 26px;
    background: #1d202b;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: var(--r);
    color: #a9a294;
    text-align: center;
    line-height: 2;
}

.rd-end { width: 720px; max-width: calc(100% - 40px); margin: 26px auto 0; }
.rd-end__card {
    padding: 26px;
    background: #1d202b;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: var(--r);
    text-align: center;
}
.rd-end__card h3 { color: #f2ecdd; font-size: 18px; }
.rd-end__card p { margin-top: 6px; color: #8f897c; font-size: 12.5px; }
.rd-end__acts { display: flex; justify-content: center; gap: 9px; margin-top: 18px; }
.rd-end__acts .btn--solid { color: #fff; }

.rd-bar {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 70;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px;
    background: rgba(29, 32, 43, .96);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 40px;
    box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .8);
    backdrop-filter: blur(10px);
}
.rd-bar__btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 36px;
    padding: 0 16px;
    border-radius: 30px;
    color: #cfc8ba;
    font-size: 12.5px;
    white-space: nowrap;
}
.rd-bar__btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.rd-bar__btn.is-main { background: var(--coral); color: #fff; }
.rd-bar__btn.is-main:hover { background: #c8462c; }
.rd-bar__sep { width: 1px; height: 18px; background: rgba(255, 255, 255, .12); }

/* 目录抽屉 */
.rd-catalog__mask {
    position: fixed;
    inset: 0;
    z-index: 120;
    background: rgba(10, 12, 18, .6);
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease;
}
.rd-catalog__mask.show { opacity: 1; visibility: visible; }
.rd-catalog {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 130;
    width: 360px;
    max-width: 88vw;
    background: #1b1e28;
    border-left: 1px solid rgba(255, 255, 255, .1);
    transform: translateX(102%);
    transition: transform .26s ease;
    display: flex;
    flex-direction: column;
}
.rd-catalog.open { transform: none; }
.rd-catalog__hd {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.rd-catalog__hd h3 { color: #f2ecdd; font-size: 15px; }
.rd-catalog__hd button { color: #8f897c; font-size: 22px; line-height: 1; }
.rd-catalog__bd { flex: 1; overflow-y: auto; padding: 8px 10px 20px; }
.catalog__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 10px;
    border-radius: 2px;
    color: #c7c1b4;
    font-size: 12.5px;
}
.catalog__item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.catalog__item span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* 付费/VIP 提示 */
.vip-box, .buy-box {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 140;
    background: rgba(10, 12, 18, .72);
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.vip-box.show, .buy-box.show { display: flex; }
.pay-dialog {
    width: 380px;
    max-width: 100%;
    padding: 28px 26px 24px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 6px;
    text-align: center;
}
.pay-dialog__icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft);
    border-radius: 50%;
    color: var(--brand);
    font-size: 24px;
}
.pay-dialog__title { font-size: 20px; }
.pay-dialog__desc { margin: 7px 0 16px; color: var(--ink-3); font-size: 12.5px; line-height: 1.8; }
.pay-dialog__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 0;
    border-top: 1px dashed var(--line);
    color: var(--ink-3);
    font-size: 12.5px;
}
.pay-dialog__row b { color: var(--ink); font-family: var(--mono); font-size: 15px; }
.pay-dialog__row--gold b { color: var(--coral); }
.pay-dialog__check { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 13px; color: var(--ink-3); font-size: 12px; }
.pay-dialog .btn { margin-top: 16px; }
.pay-dialog__tip { margin-top: 9px; color: var(--ink-3); font-size: 11.5px; }

/* ---------- 其他 ---------- */
.to-top {
    position: fixed;
    right: 26px;
    bottom: 28px;
    z-index: 80;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--deep);
    color: #f2ecdd;
    border-radius: 50%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all .22s ease;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--brand); }

.notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 11px 13px;
    background: var(--card-2);
    border: 1px solid var(--line);
    border-radius: 3px;
    color: var(--ink-3);
    font-size: 12px;
    line-height: 1.8;
}
.notice .icon { margin-top: 2px; color: var(--gold); font-size: 14px; }

@media (max-width: 992px) {
    .newgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .ustat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .utool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .doc-grid { grid-template-columns: 1fr; }
    .doc-side { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
    .doc-side h3 { width: 100%; }
}

/* ---------- 用户中心 · 仪表盘 ---------- */
.u-main { min-width: 0; }

.dash {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
.dash__col { min-width: 0; }

.u-card__hd h2 em {
    margin-left: 8px;
    font-size: 11.5px;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--ink-3);
}

/* 头像编辑 */
.avatar-edit {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--line);
}
.avatar-edit__pic {
    flex: none;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    overflow: hidden;
    background: #e8e1d3;
    border: 1px solid var(--line-2);
}
.avatar-edit__pic img { width: 100%; height: 100%; object-fit: cover; }
.avatar-edit__tip { margin-top: 7px; color: var(--ink-3); font-size: 11.5px; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
}
.form-grid .field--full { grid-column: 1 / -1; }

.textarea {
    width: 100%;
    min-height: 92px;
    padding: 10px 13px;
    background: var(--card);
    border: 1px solid var(--line-2);
    border-radius: var(--r);
    color: var(--ink);
    font-size: 13px;
    line-height: 1.8;
    resize: vertical;
    outline: none;
}
.textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.field__hint { margin-top: 5px; color: var(--ink-3); font-size: 11.5px; }

.radio-row { display: flex; gap: 18px; padding-top: 4px; }
.radio-row label { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 13px; cursor: pointer; }
.radio-row input { accent-color: var(--brand); }

.tip-box {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 12px 14px;
    background: var(--card-2);
    border: 1px solid var(--line);
    border-left: 3px solid var(--brand);
    border-radius: 2px;
    color: var(--ink-2);
    font-size: 12.5px;
    line-height: 1.85;
}
.tip-box .icon { margin-top: 3px; flex: none; color: var(--brand); font-size: 14px; }

/* 书架整理 */
.selbar {
    display: none;
    align-items: center;
    gap: 14px;
    padding: 10px 18px;
    background: var(--brand-soft);
    border-bottom: 1px solid var(--line);
    color: var(--ink-2);
    font-size: 12.5px;
}
.selbar.show { display: flex; }
.selbar b { color: var(--brand); font-family: var(--mono); font-size: 15px; }
.selbar label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.selbar input { accent-color: var(--brand); }

.shelf-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px 16px;
    padding: 18px;
}
.shelf-item { position: relative; min-width: 0; }
.shelf-item__pick {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    width: 22px;
    height: 22px;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(253, 250, 243, .92);
    border: 1px solid var(--line-2);
    border-radius: 50%;
    color: transparent;
}
.shelf-item__pick svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 3; }
.is-selecting .shelf-item__pick { display: flex; }
.shelf-item.is-picked .shelf-item__pick { background: var(--brand); border-color: var(--brand); color: #fff; }
.shelf-item.is-picked .shelf-item__pic { box-shadow: 0 0 0 2px var(--brand); }

.shelf-item__pic {
    display: block;
    position: relative;
    aspect-ratio: 3 / 4;
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
    background: #e8e1d3;
}
.shelf-item__pic img { width: 100%; height: 100%; object-fit: cover; }
.shelf-item__state {
    position: absolute;
    left: 0;
    top: 0;
    padding: 2px 7px;
    background: rgba(22, 26, 44, .84);
    color: #f2ecdd;
    font-size: 10.5px;
    border-radius: var(--r) 0 6px 0;
}
.shelf-item__title {
    display: block;
    margin-top: 8px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 13.5px;
    font-weight: 600;
}
.shelf-item__title:hover { color: var(--brand); }
.shelf-item__sub {
    margin-top: 2px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--ink-3);
    font-size: 11px;
}

/* 阅读记录 */
.read-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 20px;
    padding: 6px 18px 10px;
}
.read-card {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    min-width: 0;
}
.read-card__pic {
    flex: none;
    width: 58px;
    aspect-ratio: 3 / 4;
    border-radius: 2px;
    overflow: hidden;
    background: #e8e1d3;
}
.read-card__pic img { width: 100%; height: 100%; object-fit: cover; }
.read-card__body { flex: 1; min-width: 0; }
.read-card__name { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 13.5px; font-weight: 600; }
.read-card:hover .read-card__name { color: var(--brand); }
.read-card__chapter { display: block; margin-top: 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--ink-3); font-size: 11.5px; }
.read-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 5px; color: var(--ink-3); font-size: 10.5px; }

/* 表格 */
.table { width: 100%; font-size: 12.5px; }
.table th {
    padding: 10px 8px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-3);
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
}
.table td {
    padding: 12px 8px;
    border-bottom: 1px dashed var(--line);
    color: var(--ink-2);
    vertical-align: middle;
}
.table tr:last-child td { border-bottom: 0; }
.table .t-title { color: var(--ink); font-weight: 600; }

/* 已购作品 */
.buy-comic {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 18px;
    border-bottom: 1px solid var(--line);
}
.buy-comic:last-child { border-bottom: 0; }
.buy-comic__pic {
    flex: none;
    width: 56px;
    aspect-ratio: 3 / 4;
    border-radius: 2px;
    overflow: hidden;
    background: #e8e1d3;
}
.buy-comic__pic img { width: 100%; height: 100%; object-fit: cover; }
.buy-comic__name { font-family: var(--serif); font-size: 16px; font-weight: 800; }
.buy-comic__name:hover { color: var(--brand); }
.buy-comic__meta { margin-top: 3px; color: var(--ink-3); font-size: 11.5px; }
.buy-comic__right { margin-left: auto; flex: none; }

/* ---------- 登录页 · 分栏 ---------- */
.auth--split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 500px;
    gap: 0;
    align-items: stretch;
    width: 1100px;
    max-width: calc(100% - 44px);
    min-height: 500px;
    margin: 44px auto 58px;
    padding: 0;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 30px 70px -50px rgba(40, 34, 20, .5);
}
.auth__aside {
    position: relative;
    padding: 42px 40px;
    background: var(--deep);
    color: #f2ecdd;
    overflow: hidden;
}
.auth__aside::before {
    content: "";
    position: absolute;
    right: -90px;
    top: -90px;
    width: 280px;
    height: 280px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 50%;
}
.auth__aside::after {
    content: "漫屿";
    position: absolute;
    left: -10px;
    bottom: -54px;
    font-family: var(--serif);
    font-size: 154px;
    font-weight: 800;
    line-height: 1;
    color: rgba(255, 255, 255, .04);
    letter-spacing: .06em;
    pointer-events: none;
}
.auth__aside-kicker {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: .26em;
    color: rgba(255, 211, 110, .7);
}
.auth__aside h2 {
    position: relative;
    z-index: 1;
    margin-top: 16px;
    color: #fff;
    font-size: 30px;
    line-height: 1.4;
}
.auth__aside p {
    position: relative;
    z-index: 1;
    margin-top: 12px;
    max-width: 380px;
    color: rgba(242, 236, 221, .58);
    font-size: 12.5px;
    line-height: 2;
}
.auth__aside-list {
    position: relative;
    z-index: 1;
    margin-top: 26px;
    display: flex;
    flex-direction: column;
    gap: 11px;
}
.auth__aside-list div {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12.5px;
    color: rgba(242, 236, 221, .72);
}
.auth__aside-list .icon { color: #ffd36e; font-size: 15px; }
.auth__aside-quote {
    position: absolute;
    left: 40px;
    right: 40px;
    bottom: 36px;
    z-index: 1;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    color: rgba(242, 236, 221, .45);
    font-family: var(--serif);
    font-size: 13px;
}
.auth--split .auth__box {
    width: auto;
    max-width: none;
    padding: 40px 44px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    align-self: center;
}

/* ---------- 用户中心响应式 ---------- */
@media (max-width: 1200px) {
    .shelf-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
    .dash { grid-template-columns: 1fr; }
    .auth--split { grid-template-columns: 1fr; width: 560px; max-width: calc(100% - 32px); }
    .auth__aside { display: none; }
    .auth--split .auth__box { padding: 32px 30px; }
}
@media (max-width: 860px) {
    .shelf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .read-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .ustat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .utool-grid { grid-template-columns: 1fr; }
    .table { display: block; overflow-x: auto; white-space: nowrap; }
}
