/* 作者主页 /author/<id>
 *
 * 全服务端渲染的纸卡页面：深色底 + rgba(255,255,255,.9) 卡片 + 1.5em 圆角，
 * 与首页 / intro / 诗人广场一致。作者主题色只做点缀（印章、竖线、标签边）。
 */

/* 与站点默认容器一致：宽屏下留出左右留白，不把卡片拉满 */
html.author-page .main-container {
    max-width: 48em;
}

/* 切页/换排序后落回「全部作品」顶部时，别贴着视口边缘 */
html.author-page {
    scroll-behavior: smooth;
}

#works {
    scroll-margin-top: 1em;
}

@media (prefers-reduced-motion: reduce) {
    html.author-page {
        scroll-behavior: auto;
    }
}

.ah {
    --ah-ink: #1c1917;
    --ah-muted: #78716c;
    --ah-line: rgba(0, 0, 0, 0.08);
    /* 主题色只做底色；文字与边线用混过墨的 accent，pastel 才看得见 */
    --ah-accent: #995577;
    display: flex;
    flex-direction: column;
    gap: 1em;
    padding-bottom: 2em;
}

.ah-card {
    background: rgba(255, 255, 255, 0.9);
    color: var(--ah-ink);
    border-radius: 1.5em;
    padding: 1.4em 1.5em;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ah-title {
    margin: 0 0 0.8em;
    font-size: 1.05em;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.ah-hint {
    color: var(--ah-muted);
    font-size: 0.8em;
}

.ah-meta {
    color: var(--ah-muted);
    font-size: 0.78em;
    white-space: nowrap;
}

/* --- 身份卡 --- */
.ah-hero {
    padding-bottom: 1.1em;
}

.ah-hero-main {
    display: grid;
    /* 宽屏：左身份 / 右词云图 */
    grid-template-columns: minmax(0, 1fr) minmax(0, 14em);
    gap: 1.2em 1.6em;
    align-items: stretch;
}

.ah-hero-id {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* 头像 / 名字+badge / 装扮主页 同一行 */
.ah-hero-top {
    display: flex;
    align-items: center;
    gap: 1em;
    min-width: 0;
}

.ah-avatar {
    flex: none;
    position: relative;
    width: 2.9em;
    height: 2.9em;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25em;
    line-height: 1;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.ah-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 源图边缘有一圈浅色描边，轻微放大让它在圆形遮罩外 */
    transform: scale(1.08);
}

.ah-identity {
    display: flex;
    flex-direction: column;
    gap: 0.02em;
    min-width: 0;
}

.ah-name-badge {
    margin: 0;
}

/* 正文与代表作不再缩进，直接占满左栏 */
.ah-hero-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    margin-top: 0.9em;
}

.ah-hero-figure {
    margin: 0;
    min-width: 0;
}

.ah-hero-figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0.8em;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
    background: #f2eee8;
}

/* 图片缺失时退回单列，不留空洞 */
.ah-hero-main.no-figure {
    grid-template-columns: 1fr;
}

.ah-hero-main.no-figure .ah-hero-figure {
    display: none;
}

.ah-identity {
    flex: 1 1 auto;
    min-width: 0;
}

.ah-name {
    margin: 0;
    font-size: 1.55em;
    font-weight: 600;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 0.4em;
    flex-wrap: wrap;
}

.ah-flag {
    font-size: 0.8em;
    font-weight: 500;
    line-height: 1.6;
    padding: 0.05em 0.55em;
    border-radius: 0.35em;
    color: #7a4160;
    background: rgba(153, 85, 119, 0.14);
    letter-spacing: 0.04em;
}


.ah-bio {
    margin: 0.4em 0 0;
    font-size: 0.85em;
    line-height: 1.8;
    color: #57534e;
}

.ah-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45em 1em;
    margin: 0.6em 0 1.3em;
    font-size: 0.82em;
}

.ah-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    color: var(--ah-accent, #995577);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 0.05em;
}

.ah-link-icon {
    width: 1.05em;
    height: 1.05em;
    flex: none;
    object-fit: contain;
}

.ah-link-icon.is-svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
}

.ah-sub {
    margin: 0.45em 0 0;
    font-size: 0.78em;
    color: var(--ah-muted);
}

.ah-edit {
    flex: none;
    align-self: center;
    font-size: 0.78em;
    padding: 0.45em 0.9em;
    border-radius: 0.6em;
    color: #fff;
    /* 站点「诗」的胭脂色，别用作者主题色派生（淡彩派生出来会发灰） */
    background: #995577;
    text-decoration: none;
    white-space: nowrap;
}

.ah-edit:hover {
    filter: brightness(1.08);
    text-decoration: none;
}

.ah-numbers {
    display: flex;
    gap: 1em;
    margin: 1.1em 0 0;
    padding: 1em 0 0;
    border-top: 1px solid var(--ah-line);
    list-style: none;
}

.ah-numbers li {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2em;
}

.ah-numbers b {
    font-size: 1.45em;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.ah-numbers span {
    font-size: 0.74em;
    color: var(--ah-muted);
    letter-spacing: 0.06em;
}

/* --- 代表作（嵌在身份卡左栏，位于入驻年份下方） --- */
.ah-featured-inline {
    /* 左栏内容比配图矮时，代表作压到栏底 */
    margin-top: auto;
    padding: 0.95em 1.1em 1em;
    border-radius: 0.9em;
    border: 1px solid rgba(196, 158, 74, 0.55);
    background: rgba(0, 0, 0, 0.028);
}

.ah-eyebrow {
    margin: 0 0 0.35em;
    font-size: 0.72em;
    letter-spacing: 0.16em;
    color: var(--ah-accent, #995577);
}

.ah-featured-title {
    margin: 0 0 0.4em;
    font-size: 1.2em;
    font-weight: 600;
    font-family: 'lxgw', 'Noto Serif CJK SC', serif;
}

.ah-featured-title a {
    color: var(--ah-ink);
}

.ah-featured-body {
    margin: 0 0 0.6em;
    font-family: 'lxgw', 'Noto Serif CJK SC', serif;
    font-size: 1.02em;
    line-height: 2;
    color: #2b2723;
}

.ah-featured-meta {
    display: flex;
    align-items: baseline;
    gap: 1em;
    margin: 0;
    font-size: 0.78em;
    color: var(--ah-muted);
}

.ah-featured-meta a {
    margin-left: auto;
    color: var(--ah-accent, #995577);
    white-space: nowrap;
}

/* --- 精选作品 --- */
.ah-works {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35em 1.4em;
}

.ah-works li {
    display: flex;
    align-items: baseline;
    gap: 0.6em;
    min-width: 0;
    padding: 0.35em 0;
    border-bottom: 1px solid var(--ah-line);
}

.ah-works a {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ah-ink);
    font-size: 0.92em;
}

.ah-works .ah-meta {
    margin-left: auto;
}

/* --- 作品集 --- */
.ah-collections {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9.5em, 1fr));
    gap: 0.9em;
}

.ah-collection-privacy {
    position: absolute;
    top: 0.4em;
    left: 0.4em;
    z-index: 2;
    font-size: 0.66em;
    line-height: 1.6;
    padding: 0 0.45em;
    border-radius: 0.5em;
    color: #fff;
    background: rgba(120, 113, 108, 0.82);
    letter-spacing: 0.02em;
}

.ah-collection {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.3em;
    color: var(--ah-ink);
    text-decoration: none;
    min-width: 0;
}

.ah-collection-cover {
    position: relative;
    display: block;
    width: 100%;
    /* 竖版出版物：210mm 宽 × 297mm 高（A4），与线上封面图 738×1042 同比例 */
    aspect-ratio: 210 / 297;
    border-radius: 0.5em;
    background: #f2eee8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.ah-collection-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 源图边缘有一圈浅色描边，轻微放大让它在圆形遮罩外 */
    transform: scale(1.08);
}

/* 没有封面（或封面 404）时露出的文字封面 */
.ah-collection-cover-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.6em;
    text-align: center;
    font-family: 'lxgw', 'Noto Serif CJK SC', serif;
    font-size: 0.85em;
    color: #57534e;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.5em;
    z-index: 0;
}

.ah-collection-title {
    font-size: 0.88em;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ah-collection-meta {
    font-size: 0.74em;
    color: var(--ah-muted);
}

.ah-collection:hover .ah-collection-cover {
    transform: translateY(-2px);
}

/* --- 对诗 --- */
.ah-pairs {
    /* 1 列 → 容器 32em 起 2 列 → 48em 起 3 列（按卡片内宽 45em 反推） */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14em, 1fr));
    gap: 0.7em 0.9em;
}

.ah-pair {
    display: flex;
    flex-direction: column;
    gap: 0.4em;
    min-width: 0;
    padding: 0.65em 0.8em;
    border-radius: 0.6em;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--ah-line);
}

.ah-side {
    display: flex;
    flex-direction: column;
    gap: 0.2em;
    max-width: 90%;
}

.ah-side.up {
    align-items: flex-start;
    margin-right: auto;
}

.ah-side.down {
    align-items: flex-end;
    margin-left: auto;
}

.ah-badge {
    font-size: 0.72em;
    color: var(--ah-muted);
    border-left: 2px solid transparent;
    padding-left: 0.45em;
}

/* 代表色多为淡彩，直接画几乎看不见：混入墨色后再画 */
.ah-badge {
    border-left-color: var(--badge-color, transparent);
}

@supports (color: color-mix(in srgb, red 50%, blue)) {
    .ah-badge {
        border-left-color: color-mix(in srgb, var(--badge-color, #c4bfb8) 42%, #44403c);
    }
}

.ah-bubble {
    padding: 0.45em 0.9em;
    border-radius: 0.9em;
    background: rgba(119, 85, 153, 0.1);
    font-family: 'lxgw', 'Noto Serif CJK SC', serif;
    font-size: 0.95em;
    line-height: 1.9;
    color: #2b2723;
    word-break: break-word;
}

/* --- 全部作品 --- */
.ah-head-row {
    display: flex;
    align-items: baseline;
    gap: 0.7em;
    flex-wrap: wrap;
}

.ah-head-row .ah-title {
    margin-bottom: 0.6em;
}

.ah-sort {
    margin-left: auto;
    display: inline-flex;
    gap: 0.8em;
    font-size: 0.8em;
}

.ah-sort a {
    color: var(--ah-muted);
    text-decoration: none;
    padding-bottom: 0.1em;
    border-bottom: 2px solid transparent;
}

.ah-sort a.on {
    color: var(--ah-ink);
    border-bottom-color: var(--ah-accent, #995577);
}

.ah-tabs {
    display: flex;
    gap: 0.4em;
    padding-bottom: 0.6em;
    margin-bottom: 0.3em;
    border-bottom: 1px solid var(--ah-line);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}

.ah-tabs::-webkit-scrollbar {
    display: none;
}

.ah-tab {
    flex: none;
    font-size: 0.85em;
    padding: 0.3em 0.7em;
    border-radius: 0.5em;
    color: var(--ah-muted);
    text-decoration: none;
    white-space: nowrap;
}

.ah-tab span {
    font-size: 0.85em;
    opacity: 0.7;
}

.ah-tab:hover {
    background: rgba(0, 0, 0, 0.04);
    text-decoration: none;
}

.ah-tab.on {
    color: var(--ah-ink);
    background: rgba(153, 85, 119, 0.12);
}

/* 翻页时在卡片内左右平移：外层裁掉溢出，列表本身做位移动画 */
.ah-list-view {
    overflow: hidden;
    min-height: 6em;
}

.ah-list {
    list-style: none;
    margin: 0;
    padding: 0;
    /* >=36em 时两列；更窄自动回到单列 */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15.5em, 1fr));
    column-gap: 1.4em;
    will-change: transform, opacity;
}

.ah-list.is-sliding {
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .ah-list {
        transition: none !important;
    }
}

.ah-list li {
    display: flex;
    align-items: baseline;
    gap: 0.7em;
    padding: 0.5em 0;
    border-bottom: 1px solid var(--ah-line);
    min-width: 0;
}

.ah-list li:last-child {
    border-bottom: none;
}

.ah-list a {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ah-ink);
    font-size: 0.92em;
}

.ah-list .ah-meta {
    flex: none;
}

.ah-views {
    flex: none;
    margin-left: auto;
    font-size: 0.76em;
    color: #a8a29e;
    font-variant-numeric: tabular-nums;
    min-width: 2.5em;
    text-align: right;
}

.ah-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1em;
    margin-top: 1em;
    font-size: 0.82em;
    color: var(--ah-muted);
}

.ah-pager a {
    color: var(--ah-accent, #995577);
}

.ah-pager .off {
    color: #d6d3d1;
}

.ah-empty {
    margin: 1em 0 0.2em;
    font-size: 0.85em;
    color: var(--ah-muted);
}

/* --- 风格速写（沿用旧站 SOUL PORTRAIT 海报，逐条照搬，勿随手改） --- */
.ah-style {
    margin-bottom: 1em;
}

.ah-style .poster-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
    border-radius: 20px;
    padding: 1.8em;
    position: relative;
    overflow: hidden;
    color: #333;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.ah-style .poster-blob {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.25;
    z-index: 0;
}

.ah-style .blob-1 { top: -20px; right: -20px; }
.ah-style .blob-2 { bottom: -30px; left: -30px; width: 100px; height: 100px; }

.ah-style .poster-inner {
    position: relative;
    z-index: 1;
}

.ah-style .poster-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2em;
    border-bottom: 2px solid #333;
    padding-bottom: 0.8em;
}

.ah-style .poster-title {
    font-size: 1.1em;
    font-weight: 900;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    margin: 0;
    line-height: 1;
}

.ah-style .poster-subtitle {
    font-size: 0.6em;
    opacity: 0.5;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 4px;
}

.ah-style .poster-year {
    font-family: monospace;
    font-size: 0.9em;
    font-weight: bold;
    opacity: 0.6;
    background: #eee;
    padding: 2px 6px;
    border-radius: 4px;
}

.ah-style .poster-row {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    margin-bottom: 1em;
    gap: 1em;
}

.ah-style .stat-block-main { flex: 1; }

.ah-style .stat-block-side {
    flex: 0 0 auto;
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.ah-style .poster-label {
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.5;
    margin-bottom: 0.3em;
    font-weight: 700;
}

.ah-style .val-huge {
    font-size: 4.5em;
    font-weight: 700;
    line-height: 0.8;
    letter-spacing: -0.0em;
    color: #222;
}

.ah-style .val-unit {
    font-size: 0.3em;
    opacity: 0.4;
    font-weight: normal;
    vertical-align: middle;
    margin-left: 8px;
}

.ah-style .season-emoji {
    font-size: 2.5em;
    line-height: 1;
    margin-bottom: 0.1em;
}

.ah-style .season-text {
    font-size: 1.1em;
    font-weight: 700;
}

.ah-style .poster-narrative {
    display: flex;
    flex-direction: column;
    gap: 1.2em;
    margin-bottom: 1em;
}

.ah-style .narrative-item {
    border-left: 3px solid rgba(0, 0, 0, 0.1);
    padding-left: 1em;
}

.ah-style .narrative-title {
    font-size: 0.9em;
    font-weight: 800;
    margin-bottom: 0.3em;
}

.ah-style .narrative-desc {
    font-size: 0.85em;
    opacity: 0.7;
    line-height: 1.5;
}

.ah-style .soulmate-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 0.5em;
}

.ah-style .soulmate-tag {
    background: rgba(255, 255, 255, 0.7);
    border-left: 4px solid #ccc;
    padding: 0.4em 0.8em 0.4em 0.6em;
    font-size: 0.9em;
    font-weight: bold;
    color: #555;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s;
}

.ah-style .soulmate-tag:hover {
    transform: translateY(-2px);
    background: #fff;
    color: #222;
}

.ah-style .inventory-section {
    background: rgba(204, 206, 212, 0.2);
    border-radius: 12px;
    padding: 1em 1em 1em 1.2em;
    margin-top: 1em;
}

.ah-style .inventory-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6em;
    margin-top: 0.5em;
}

.ah-style .inventory-tag {
    font-size: 0.8em;
    padding: 0.4em 0.8em;
    border: 1px solid #ddd;
    border-radius: 50px;
    background: #fff;
    color: #555;
    font-weight: 500;
    transition: transform 0.2s;
}

.ah-style .inventory-tag:hover {
    transform: translateY(-2px);
    border-color: #999;
    color: #111;
}

.ah-style .tag-count {
    font-size: 0.8em;
    opacity: 0.5;
    margin-left: 4px;
}


/* --- 诗友：本人 ↔ 诗友 的关系行 --- */
.ah-friends {
    /* >=36em 时两列；每张卡自己算宽，不靠视口 */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16em, 1fr));
    gap: 0.7em;
    align-items: start;
}

.ah-friend {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.45em;
    padding: 0.55em 0.8em 0.55em 0.95em;
    border-radius: 0.7em;
    background: rgba(0, 0, 0, 0.03);
    /* 左边本人色、右边对方色 */
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--self-color, #995577);
    border-right: 4px solid var(--friend-color, #995577);
    min-width: 0;
}

.ah-friend.is-extra {
    display: none;
}

.ah-friends.is-open .ah-friend.is-extra {
    display: flex;
}

/* 一行关系：本人 ——出——▶ ◀——入—— 诗友 */
.ah-rel {
    /* 三栏等分：左右名字各占 1fr，箭头永远落在整行正中，不受名字长短影响 */
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    column-gap: 0.8em;
    min-width: 0;
}

.ah-rel-side {
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    min-width: 0;
    text-decoration: none;
}

.ah-rel-side.self {
    justify-self: start;
}

.ah-rel-side.friend {
    justify-self: end;
}

.ah-rel-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ah-rel-side.self .ah-rel-name {
    font-size: 0.82em;
    color: var(--ah-muted);
}

.ah-rel-side.friend .ah-rel-name {
    font-size: 0.9em;
    font-weight: 600;
    color: var(--ah-ink);
}

a.ah-rel-side.friend:hover .ah-rel-name {
    text-decoration: underline;
}

.ah-rel-dot {
    flex: none;
    width: 0.5em;
    height: 0.5em;
    border-radius: 50%;
    background: var(--rel-color, #995577);
}

/* 可逆箭头：上→下←，数量写在箭头上下 */
.ah-rel-link {
    justify-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.05em;
    color: #a8a29e;
}

.ah-rel-count {
    font-size: 0.72em;
    font-weight: 600;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.ah-rel-count.out {
    color: #7a4160;
    /* 与箭头收紧 0.5em，抵消 SVG viewBox 顶部留白 */
    margin-bottom: -0.5em;
}

.ah-rel-count.in {
    color: #45596b;
    margin-top: -0.5em;
}

/* 细横线 + 单斜杠箭头，参考手绘式样 */
.ah-rel-symbol {
    /* 尺寸按 viewBox 比例给，避免 SVG 内出现空白区 */
    width: 4.6em;
    max-width: 100%;
    height: 1.44em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
    stroke-linecap: butt;
    stroke-linejoin: miter;
    opacity: 0.8;
}

/* 多张车票叠在同一个网格单元里，切换时互相淡入淡出 */
.ah-samples {
    display: grid;
    /* 列宽跟随容器，不被最长的一张车票撑开 */
    grid-template-columns: minmax(0, 1fr);
}

.ah-sample {
    grid-area: 1 / 1;
    min-width: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.ah-sample.on {
    opacity: 1;
    pointer-events: auto;
}

/* 车票：左侧票根（和/唱）+ 出发 → 关系 → 到达 */
.ah-ticket {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 0.55em;
    padding: 0.32em 0.6em;
    border: 1px dashed rgba(0, 0, 0, 0.16);
    border-radius: 0.55em;
    background: #fdfbf6;
    transition: border-color 0.15s ease, background 0.15s ease;
    /* 车票打孔：左右各剪一个半圆缺口；不支持 mask 的浏览器只是没有缺口 */
    --ah-notch: 0.4em;
    -webkit-mask-image:
        radial-gradient(circle var(--ah-notch) at 0 50%, transparent 99%, #000 100%),
        radial-gradient(circle var(--ah-notch) at 100% 50%, transparent 99%, #000 100%);
    -webkit-mask-composite: source-in;
    mask-image:
        radial-gradient(circle var(--ah-notch) at 0 50%, transparent 99%, #000 100%),
        radial-gradient(circle var(--ah-notch) at 100% 50%, transparent 99%, #000 100%);
    mask-composite: intersect;
}

.ah-ticket:hover {
    border-color: rgba(153, 85, 119, 0.45);
    background: #fffdf9;
}

.ah-route {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5em;
    min-width: 0;
}

.ah-station {
    flex: 1 1 0;
    min-width: 0;
    font-family: 'lxgw', 'Noto Serif CJK SC', serif;
    font-size: 0.82em;
    color: #2b2723;
    text-decoration: none;
    /* 固定一行，超出省略；不再折两行 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ah-station:hover {
    color: #7a4160;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.ah-station.left {
    text-align: right;
}

.ah-station.right {
    text-align: left;
}

/* 车票中间：类型 badge 悬在箭头上方，箭头整体偏下 */
.ah-track {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.05em;
    min-width: 5em;
    color: #a8a29e;
}

.ah-track-label {
    flex: none;
    font-size: 0.68em;
    letter-spacing: 0.04em;
    padding: 0.05em 0.35em;
    /* 贴近箭头：负 margin 吃掉 SVG 内部的空白（见下方注释） */
    margin-bottom: -0.42em;
    border-radius: 0.3em;
    background: rgba(0, 0, 0, 0.05);
    color: #6b6357;
}

.ah-track-arrow {
    flex: none;
    /* 与 .ah-rel-symbol 同一比例尺（64 单位 = 4.6em），视觉大小一致 */
    width: 4.6em;
    max-width: 100%;
    height: 0.72em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
    stroke-linecap: butt;
    stroke-linejoin: miter;
    opacity: 0.8;
}

/* 反向关系（对方引用我方）时箭头镜像 */
.ah-track-arrow.is-reversed {
    transform: scaleX(-1);
}

/* 两个箭头尺寸不同，用 non-scaling-stroke 让线宽统一为 1.4px */
.ah-rel-symbol path,
.ah-track-arrow path {
    vector-effect: non-scaling-stroke;
}

.ah-more {
    display: block;
    margin: 0.9em auto 0;
    font: inherit;
    font-size: 0.8em;
    color: #57534e;
    background: rgba(0, 0, 0, 0.04);
    border: none;
    border-radius: 999px;
    padding: 0.4em 1.2em;
    cursor: pointer;
}

.ah-more:hover {
    background: rgba(153, 85, 119, 0.12);
    color: #7a4160;
}

/* --- 移动端 --- */
@media (max-width: 600px) {
    html.author-page .main-container {
        max-width: none;
    }

    /* 移动端顶部有 64px 固定栏 */
    #works {
        scroll-margin-top: 4.5em;
    }

    .ah-card {
        border-radius: 1.1em;
        padding: 1.1em 1em;
    }

    .ah-hero-main {
        grid-template-columns: 1fr;
        gap: 1em;
    }

    /* 窄屏：词云图放到入驻日期之后，整宽，和以前一样 */
    .ah-hero-figure {
        margin-top: 0.2em;
    }

    /* 触控目标别太小 */
    .ah-edit {
        display: inline-flex;
        align-items: center;
        min-height: 36px;
    }

    .ah-hero-body {
        margin-top: 0.8em;
    }

    .ah-name {
        font-size: 1.3em;
    }

    .ah-edit {
        margin-left: auto;
    }

    .ah-numbers b {
        font-size: 1.2em;
    }

    .ah-works {
        grid-template-columns: 1fr;
    }

    .ah-collections {
        grid-template-columns: repeat(auto-fill, minmax(5.8em, 1fr));
        gap: 0.6em;
    }

    .ah-featured-body {
        font-size: 0.98em;
        line-height: 1.9;
    }

    .ah-track {
        min-width: 3.6em;
    }

    /* 移动端也保持一行：标题省略号，日期与浏览数跟在后面 */
    .ah-list a {
        flex: 1 1 auto;
        white-space: nowrap;
    }

    .ah-views {
        margin-left: auto;
    }
}
