/* 文件位置: /assets/index/css/style.css */
html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: relative;
    overscroll-behavior: none;
    -webkit-tap-highlight-color: transparent;
}

body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
}

header {
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

/* 首页推荐/关注标签栏：让滚动内容在半透明表面下形成毛玻璃层次。 */
.feed-frosted-header {
    background-color: rgba(255, 255, 255, 0.78);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
}

/* 手机底栏实际高度为 74px（含底部留白）；消息区滚动，输入栏停在底栏上方。 */
.chat-mobile-thread {
    height: calc(100vh - 74px);
    height: calc(100dvh - 74px);
    min-height: 0;
}
.chat-mobile-thread-header,
.chat-mobile-compose {
    flex-shrink: 0;
}
@media (min-width: 768px) {
    .chat-mobile-thread {
        height: 100vh;
        height: 100dvh;
    }
}

/* 暴力封死移动端底部栏的穿透和留白 */
#layout-mobile-nav {
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

/* 暴力向下扩展背景色 80px，彻底填死 iOS 视口与 Home Indicator 间隙 */
#layout-mobile-nav::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 100px;
    background: inherit;
    pointer-events: none;
}

.no-scrollbar::-webkit-scrollbar { 
    display: none; 
}
.no-scrollbar { 
    -ms-overflow-style: none; 
    scrollbar-width: none; 
}

/* 首页顶栏：PC 无毛玻璃通栏仅方圆胶囊；移动端用内部 feed-frosted 原始通栏 */
header.gy-home-top {
    background: transparent;
    border: 0;
    box-shadow: none;
    transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}
@media (min-width: 768px) {
    header.gy-home-top {
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
        background: transparent !important;
    }
    .gy-home-tab-pill {
        background: #fff !important;
        -webkit-backdrop-filter: none !important;
        backdrop-filter: none !important;
    }
    #layout-main.pc-home-header-hidden header.gy-home-top {
        transform: translate3d(0, calc(-100% - 8px), 0);
        pointer-events: none;
    }
}
@media (max-width: 767px) {
    #layout-main header.sticky {
        transition-property: transform, background-color, border-color, box-shadow;
        transition-duration: 300ms, 200ms, 200ms, 200ms;
        transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1), ease, ease, ease;
        will-change: transform;
    }
    #layout-main.mobile-header-hidden header.sticky {
        transform: translate3d(0, calc(-100% - env(safe-area-inset-top, 0px) - 2px), 0);
        pointer-events: none;
    }
}

/* ============================================================
   iOS WebApp 顶部安全区
   独立窗口模式下 WebView 会铺满整块屏幕（包含状态栏区域），
   没有留白的页面头会被状态栏直接压住，标题看起来像被"拽"到屏幕外。
   由页面头自己承担 env(safe-area-inset-top)，再补一点呼吸间距。
   ============================================================ */
.gy-page-header {
    box-sizing: border-box;
    /* 旧版 iOS 不认 env()：先给一段固定留白，支持的设备再叠加安全区。 */
    padding-top: 6px;
    padding-top: calc(env(safe-area-inset-top, 0px) + 6px);
    height: auto !important;
    min-height: 60px;
    min-height: calc(60px + env(safe-area-inset-top, 0px));
}
@media (max-width: 767px) {
    .gy-page-header {
        padding-top: 10px;
        padding-top: calc(env(safe-area-inset-top, 0px) + 10px);
        min-height: 64px;
        min-height: calc(64px + env(safe-area-inset-top, 0px));
        padding-bottom: 8px;
    }
}

/* ============================================================
   通知中心：对齐 X.com 的通知行结构
   彩色细图标 | 40px 头像 | 文案 + 摘录 | 56px 帖子缩略图
   ============================================================ */
.gy-notif-list { display: block; background: #fff; padding-bottom: 20px; }

/* 通知行：类型图标 | 头像 | 文案 | 帖子缩略图（X 式一条流，不再套引用框） */
.gy-notif-item {
    display: grid;
    grid-template-columns: 24px 40px minmax(0, 1fr);
    align-items: start;
    column-gap: 10px;
    width: 100%;
    margin: 0;
    padding: 12px 16px;
    border: 0;
    border-bottom: 1px solid #eff3f4;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 120ms ease;
}
.gy-notif-item.has-thumb { grid-template-columns: 24px 40px minmax(0, 1fr) 56px; }
.gy-notif-item:hover { background: rgba(0, 0, 0, 0.03); }
.gy-notif-item:active { background: rgba(0, 0, 0, 0.06); }
.gy-notif-item:focus-visible { outline: 2px solid #1d9bf0; outline-offset: -2px; }

/* 类型图标：裸图标 + 品牌色 */
.gy-notif-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    margin-top: 10px;
    font-size: 16px;
    line-height: 1;
    color: #536471;
}

.gy-notif-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    object-fit: cover;
    background: #cfd9de;
}

.gy-notif-main { display: block; min-width: 0; }
.gy-notif-top { display: flex; align-items: baseline; gap: 5px; min-width: 0; }
.gy-notif-name {
    font-size: 15px;
    font-weight: 700;
    line-height: 20px;
    color: #0f1419;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 0 1 auto;
    max-width: 58%;
}
.gy-notif-msg {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 15px;
    line-height: 20px;
    color: #536471;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gy-notif-time {
    margin-left: auto;
    padding-left: 6px;
    font-size: 13px;
    line-height: 20px;
    color: #536471;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    flex: 0 0 auto;
}

/* 第二行：正文摘录 + 帖子缩略图并排，不再是引用框 */
.gy-notif-body { display: flex; align-items: flex-start; gap: 10px; margin-top: 2px; }

/* 被赞/被回复帖子的正文摘录 */
.gy-notif-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 14px;
    line-height: 19px;
    color: #536471;
    word-break: break-word;
}

/* 帖子缩略图：固定 56px 方块，跟在摘录右侧 */
.gy-notif-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    overflow: hidden;
    background: #eff3f4;
    color: #536471;
    font-size: 13px;
}
.gy-notif-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gy-notif-thumb.is-video { background: #e8ebed; }

/* 头部操作：勿扰 / 清除全部 */
.gy-notif-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #536471;
    cursor: pointer;
    transition: background-color 140ms ease, color 140ms ease;
}
.gy-notif-tool:hover { background: rgba(15, 20, 25, 0.07); color: #0f1419; }
.gy-notif-tool.is-active { color: #1d9bf0; background: rgba(29, 155, 240, 0.1); }
.gy-notif-tool:focus-visible { outline: 2px solid #1d9bf0; outline-offset: 1px; }

/* X 风格线框图标：本地 SVG 通过 mask 上色，可随状态换色，无远程依赖 */
.gy-icon {
    display: block;
    width: 20px;
    height: 20px;
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}
.gy-icon-bell-off { -webkit-mask-image: url("/assets/img/icons/bell-off.svg"); mask-image: url("/assets/img/icons/bell-off.svg"); }
.gy-icon-trash { -webkit-mask-image: url("/assets/img/icons/trash.svg"); mask-image: url("/assets/img/icons/trash.svg"); }

.gy-notif-muted-chip {
    display: inline-flex;
    align-items: center;
    height: 19px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(29, 155, 240, 0.12);
    color: #1d9bf0;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 380px) {
    .gy-notif-item { grid-template-columns: 20px 36px minmax(0, 1fr); column-gap: 8px; padding: 12px 12px; }
    .gy-notif-item.has-thumb { grid-template-columns: 20px 36px minmax(0, 1fr) 48px; }
    .gy-notif-thumb { width: 48px; height: 48px; }
}


/* 移动端个人导航侧栏：悬浮圆角半透明抽屉（X 式滑入 + 玻璃质感）。 */
#mobile-profile-drawer-backdrop {
    background: rgba(15, 20, 25, 0.36);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 260ms ease, visibility 0s linear 320ms;
}
#mobile-profile-drawer-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 260ms ease;
}
.mobile-profile-drawer {
    top: max(10px, env(safe-area-inset-top, 0px));
    bottom: max(10px, env(safe-area-inset-bottom, 0px));
    left: 10px;
    width: min(82vw, 318px);
    max-width: calc(100vw - 20px);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.86);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    backdrop-filter: blur(28px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow:
        0 18px 50px rgba(15, 20, 25, 0.18),
        0 2px 10px rgba(15, 20, 25, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
    transform: translate3d(calc(-100% - 18px), 0, 0);
    visibility: hidden;
    transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 320ms;
    will-change: transform;
    overscroll-behavior: contain;
}
.mobile-profile-drawer.is-open {
    transform: translate3d(0, 0, 0);
    visibility: visible;
    transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s;
}
.mobile-profile-drawer .gy-drawer-item {
    margin: 2px 0;
}
body.mobile-profile-drawer-open #layout-main {
    overflow: hidden;
}
@media (prefers-reduced-motion: reduce) {
    #layout-main header.sticky,
    #mobile-profile-drawer,
    #mobile-profile-drawer-backdrop {
        transition-duration: 1ms !important;
    }
}

/* Mobile nav shell: avoid display:contents (Safari hit-testing bugs with fixed children).
   Zero-size wrapper keeps fixed bottom nav / drawer out of flex flow. */
.mobile-nav-shell {
    position: absolute;
    width: 0;
    height: 0;
    overflow: visible;
    pointer-events: none;
}
.mobile-nav-shell > #layout-mobile-nav,
.mobile-nav-shell > #mobile-profile-drawer {
    pointer-events: auto;
}
/* backdrop keeps its own pointer-events rules (none when closed, auto when open) */

/* X-style fullscreen post image viewer. */
html.post-image-viewer-open,
body.post-image-viewer-open {
    overflow: hidden !important;
}
.post-image-viewer {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px 76px 54px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.96);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 180ms ease, visibility 180ms ease;
    overscroll-behavior: contain;
    -webkit-tap-highlight-color: transparent;
}
.post-image-viewer.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.post-image-viewer-topbar {
    position: absolute;
    z-index: 3;
    top: max(14px, env(safe-area-inset-top, 0px));
    left: 22px;
    right: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    color: #fff;
}
.post-image-viewer-counter {
    min-width: 48px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
.post-image-viewer-close,
.post-image-viewer-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    cursor: pointer;
    transition: background 150ms ease, transform 150ms ease;
    -webkit-appearance: none;
    appearance: none;
}
.post-image-viewer-close:hover,
.post-image-viewer-nav:hover {
    background: rgba(255, 255, 255, 0.25);
}
.post-image-viewer-close:active,
.post-image-viewer-nav:active {
    transform: scale(0.94);
}
.post-image-viewer-close {
    width: 42px;
    height: 42px;
    padding: 0;
    line-height: 0;
    font-size: 0;
}
.post-image-viewer-close-icon {
    display: block;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    overflow: visible;
}
.post-image-viewer-close-icon path {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.post-image-viewer-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    touch-action: pan-y;
}
.post-image-viewer-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}
.post-image-viewer-nav {
    position: absolute;
    z-index: 2;
    top: 50%;
    width: 48px;
    height: 48px;
    margin-top: -24px;
    font-size: 36px;
    line-height: 1;
    font-weight: 300;
}
.post-image-viewer-prev { left: 18px; }
.post-image-viewer-next { right: 18px; }
.post-image-viewer-nav[hidden],
.post-image-viewer-hint[hidden] { display: none !important; }
.post-image-viewer-hint {
    position: absolute;
    bottom: max(14px, env(safe-area-inset-bottom, 0px));
    left: 0;
    right: 0;
    color: rgba(255, 255, 255, 0.58);
    font-size: 12px;
    text-align: center;
    pointer-events: none;
}
.post-media-preview-button { cursor: zoom-in; }
.post-media-gallery .post-media-preview-button {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
}
@media (max-width: 767px) {
    .post-image-viewer {
        padding: 58px 8px 42px;
    }
    .post-image-viewer-topbar {
        top: max(8px, env(safe-area-inset-top, 0px));
        left: 12px;
        right: 12px;
    }
    .post-image-viewer-close {
        width: 40px;
        height: 40px;
    }
    .post-image-viewer-nav {
        width: 38px;
        height: 38px;
        margin-top: -19px;
        font-size: 30px;
        background: rgba(0, 0, 0, 0.35);
    }
    .post-image-viewer-prev { left: 8px; }
    .post-image-viewer-next { right: 8px; }
    .post-image-viewer-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .post-image-viewer,
    .post-image-viewer-close,
    .post-image-viewer-nav { transition-duration: 1ms !important; }
}

/* X 风格通知计数：个位数固定为正圆，多位数时自然扩展为胶囊。 */
.notification-count-badge {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 17px;
    width: auto;
    height: 17px;
    aspect-ratio: 1 / 1;
    padding: 0 4px;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    flex: 0 0 auto;
}
.notification-count-badge-mobile {
    min-width: 17px;
    height: 17px;
    font-size: 9px;
}
@media (min-width: 1280px) {
    .gy-sidebar-compose { width: 100%; }
}

/* X-style inline composer entry on the home timeline. */
.gy-home-compose-tool{width:34px;height:34px;border:0;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;background:transparent;color:inherit;font-size:17px;cursor:pointer;transition:background .15s,color .15s}
.gy-home-compose-tool:hover{background:rgba(29,155,240,.10);color:#1d9bf0}
.gy-home-compose-submit{height:36px;min-width:64px;padding:0 18px;border:0;border-radius:999px;background:#0f1419;color:#fff;font-size:14px;font-weight:750;cursor:pointer;white-space:nowrap;transition:opacity .15s,background .15s}
.gy-home-compose-submit:hover{background:#272c30}
.gy-home-compose-prompt:focus-visible,.gy-home-compose-tool:focus-visible,.gy-home-compose-submit:focus-visible{outline:2px solid #1d9bf0;outline-offset:2px}
@media (max-width:420px){.gy-home-inline-composer{padding-left:12px;padding-right:12px}.gy-home-compose-tool{width:31px;height:32px;font-size:15px}.gy-home-compose-submit{min-width:58px;padding:0 15px}}

/* X 风格首页内嵌发帖器：在时间线顶部直接输入与发布，不调用弹窗。 */
.gy-home-inline-composer{background:var(--gy-home-composer-bg,transparent)}
.gy-home-compose-main{min-width:0}
.gy-home-compose-editor{display:block;min-height:58px;max-height:320px;resize:vertical;border:0;outline:0;background:transparent;color:#0f1419;font:inherit;font-size:20px;line-height:1.45;padding:5px 0 8px;box-shadow:none}
.gy-home-compose-editor::placeholder{color:#657786}
.gy-home-compose-editor[readonly]{cursor:default}
.gy-home-compose-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-left:52px;margin-top:8px}
.gy-home-compose-tools{display:flex;align-items:center;gap:2px;flex-wrap:wrap;color:#7895a9}
.gy-home-compose-tool:disabled{opacity:.45;cursor:not-allowed}
button.gy-home-compose-submit:disabled,
.gy-home-compose-submit:disabled,
.gy-home-compose-submit[disabled]{opacity:.55!important;background:#aab0b5!important;color:#fff!important;cursor:not-allowed!important}
button.gy-home-compose-submit.is-ready,
.gy-home-compose-submit.is-ready,
button.gy-home-compose-submit:not(:disabled),
.gy-home-compose-submit:not(:disabled),
.gy-home-compose-submit:not([disabled]){background:#0f1419!important;color:#fff!important;opacity:1!important;cursor:pointer!important}
button.gy-home-compose-submit.is-ready:hover,
.gy-home-compose-submit.is-ready:hover,
.gy-home-compose-submit:not(:disabled):hover{background:#272c30!important}
.gy-home-compose-url-panel{margin:6px 0 10px;padding:10px 11px;border:1px solid #cfd9de;border-radius:12px;background:#fff}
.gy-home-compose-url-heading{font-size:12px;font-weight:750;color:#536471;margin-bottom:6px}
.gy-home-compose-url-row{display:flex;gap:8px;align-items:center;margin-top:6px}
.gy-home-compose-url-row input{min-width:0;flex:1;border:1px solid #cfd9de;border-radius:8px;padding:9px 10px;font-size:13px;outline:none;background:#fff;color:#0f1419}
.gy-home-compose-url-row input:focus{border-color:#1d9bf0}
.gy-home-compose-url-row button,.gy-home-compose-add-url{border:0;background:transparent;color:#1d9bf0;cursor:pointer}
.gy-home-compose-add-url{margin-top:8px;font-size:12px;font-weight:700}
.gy-home-compose-url-panel p{margin:6px 0 0;color:#8294a1;font-size:11px}
.gy-home-compose-preview{display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:8px;margin:8px 0}
.gy-home-compose-preview[hidden],.gy-home-compose-url-panel[hidden]{display:none!important}
.gy-home-compose-preview .gy-compose-preview-item{position:relative;min-height:80px;border-radius:12px;overflow:hidden;border:1px solid #e1e8ed;background:#f7f9fa}
.gy-home-compose-preview img,.gy-home-compose-preview video{display:block;width:100%;height:120px;object-fit:cover}
.gy-home-compose-preview .gy-compose-remove{position:absolute;right:6px;top:6px;width:28px;height:28px;border:0;border-radius:50%;background:rgba(15,20,25,.72);color:white;cursor:pointer}
@media(max-width:420px){.gy-home-compose-editor{font-size:18px}.gy-home-compose-footer{padding-left:48px}.gy-home-compose-tool{width:31px;height:32px;font-size:15px}.gy-home-compose-submit{min-width:58px;padding:0 15px}}

/* ============================================================
   私信气泡：对齐 X 的 DM 视觉
   我方黑底白字、对方浅灰底黑字，圆角统一 20px，时间移到气泡外下方。
   ============================================================ */
.gy-msg-row { display: flex; margin-bottom: 10px; }
.gy-msg-row.is-mine { justify-content: flex-end; }
.gy-msg-row.is-theirs { justify-content: flex-start; }
.gy-msg { display: flex; flex-direction: column; min-width: 0; max-width: 78%; }
.gy-msg-row.is-mine .gy-msg { align-items: flex-end; }
.gy-msg-row.is-theirs .gy-msg { align-items: flex-start; }
.gy-msg-bubble {
    padding: 9px 14px;
    border-radius: 20px;
    font-size: 15px;
    line-height: 1.42;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.gy-msg-row.is-mine .gy-msg-bubble { background: #0f1419; color: #ffffff; }
.gy-msg-row.is-theirs .gy-msg-bubble { background: #f3f4f6; color: #0f1419; }
.gy-msg-time {
    margin-top: 4px;
    font-size: 11px;
    color: #536471;
    font-variant-numeric: tabular-nums;
}
.gy-msg-row.is-mine .gy-msg-time.is-read { color: #0f1419; font-weight: 600; }

/* ============================================================
   键盘弹起：底栏跟着键盘一起沉下去，只把输入框顶在键盘上方。
   iOS WebApp 里键盘压缩视口时，100dvh 已经是可见高度；
   若视口没被压缩（仅 visualViewport 变小），用 --gy-kb 补差值。
   ============================================================ */
@media (max-width: 1023px) {
    #layout-mobile-nav {
        transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1), opacity 160ms ease;
    }
    body.gy-keyboard-open #layout-mobile-nav {
        transform: translate3d(0, 130%, 0);
        opacity: 0;
        pointer-events: none;
    }
    body.gy-keyboard-open #layout-mobile-nav::after { display: none; }
    body.gy-keyboard-open .chat-mobile-thread {
        height: calc(100dvh - var(--gy-kb, 0px));
    }
    body.gy-keyboard-open .chat-mobile-compose { padding-bottom: 10px; }
}

/* ============================================================
   私信气泡菜单（长按 / 右键）：复刻 X 气泡下方的小浮层
   仅提供「复制」与「撤回（5 分钟内）」
   ============================================================ */
.gy-msg-bubble {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}
.gy-msg-menu {
    position: fixed;
    z-index: 210;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 150px;
    max-width: calc(100vw - 16px);
    padding: 6px;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 20, 25, 0.18), 0 0 0 1px rgba(15, 20, 25, 0.06);
    animation: gyMsgMenuIn 120ms ease-out;
}
@keyframes gyMsgMenuIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: none; }
}
.gy-msg-menu-item {
    -webkit-appearance: none;
    appearance: none;
    border: 0;
    border-radius: 10px;
    padding: 10px 12px;
    background: transparent;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    text-align: left;
    color: #0f1419;
    cursor: pointer;
}
.gy-msg-menu-item:hover { background: rgba(15, 20, 25, 0.06); }
.gy-msg-menu-item.is-danger { color: #f4212e; }
.gy-msg-menu-item[disabled] { color: #8b98a5; font-weight: 500; cursor: default; }
.gy-msg-menu-item[disabled]:hover { background: transparent; }

/* Article reader */
.gy-article-body a.gy-blue-link,
.gy-article-body a { color: #1d9bf0; text-decoration: none; }
.gy-article-body a.gy-blue-link:hover,
.gy-article-body a:hover { text-decoration: underline; }
.gy-article-body h2 { font-size: 1.35em; font-weight: 800; margin: 1.4em 0 0.6em; line-height: 1.3; }
.gy-article-body h3 { font-size: 1.15em; font-weight: 750; margin: 1.2em 0 0.5em; }
.gy-article-body p { margin: 0.85em 0; }
.gy-article-body blockquote { margin: 1em 0; padding: 0.6em 1em; border-left: 4px solid #cfd9de; color: #536471; background: #f7f9fa; border-radius: 0 12px 12px 0; }
.gy-article-body img { max-width: 100%; height: auto; border-radius: 14px; margin: 0.75em 0; }
.gy-article-body figure { margin: 1.25em 0; }
.gy-article-body figcaption { font-size: 13px; color: #536471; text-align: center; margin-top: 0.4em; }
.gy-article-body ul, .gy-article-body ol { margin: 0.75em 0; padding-left: 1.4em; }
.gy-article-body li { margin: 0.35em 0; }

/* Article rich blocks */
.gy-article-body .gy-article-figure { margin: 1.1em 0; }
.gy-article-body .gy-article-video video { width: 100%; max-height: 480px; border-radius: 14px; background: #000; }
.gy-article-body .gy-article-embed { position: relative; width: 100%; padding-top: 56.25%; margin: 1.1em 0; border-radius: 14px; overflow: hidden; background: #0f1419; }
.gy-article-body .gy-article-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gy-article-body .gy-copy-block { position: relative; margin: 1em 0; border: 1px solid #e1e8ed; border-radius: 12px; background: #f7f9fa; overflow: hidden; }
.gy-article-body .gy-copy-block pre { margin: 0; padding: 14px 16px; padding-right: 72px; white-space: pre-wrap; word-break: break-word; font-size: 13px; line-height: 1.5; color: #0f1419; }
.gy-article-body .gy-copy-btn { position: absolute; top: 8px; right: 8px; border: 0; border-radius: 999px; background: #0f1419; color: #fff; font-size: 12px; font-weight: 700; padding: 6px 12px; cursor: pointer; }
.gy-article-body .gy-copy-btn:hover { opacity: 0.88; }
.gy-article-body h2[id], .gy-article-body h3[id] { scroll-margin-top: 72px; }
.gy-article-toc { position: sticky; top: 60px; }

/* ============================================================
   2026-11-27 · 帖子三点菜单 / 可见范围徽标 / 注册提示 / 方圆顶栏
   所有图标均为手绘内联 SVG，不依赖任何远程资源。
   ============================================================ */
.gy-post-menu-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-left: 8px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #536471;
    cursor: pointer;
    transition: background-color 140ms ease, color 140ms ease;
}
.gy-post-menu-trigger:hover { background: rgba(29, 155, 240, 0.12); color: #1d9bf0; }
.gy-post-menu-trigger svg { width: 18px; height: 18px; display: block; }
.gy-post-menu-trigger svg circle { fill: currentColor; }

.gy-post-menu {
    position: fixed;
    z-index: 320;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 196px;
    max-width: calc(100vw - 16px);
    padding: 6px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 14px 38px rgba(15, 20, 25, 0.18), 0 0 0 1px rgba(15, 20, 25, 0.06);
    animation: gyPostMenuIn 130ms ease-out;
}
@keyframes gyPostMenuIn { from { opacity: 0; transform: translateY(-4px) scale(0.97); } to { opacity: 1; transform: none; } }
.gy-post-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 11px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: #0f1419;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background-color 130ms ease;
}
.gy-post-menu-item:hover { background: rgba(15, 20, 25, 0.06); }
.gy-post-menu-item.is-danger { color: #f4212e; }
.gy-post-menu-item.is-danger:hover { background: rgba(244, 33, 46, 0.08); }
.gy-post-menu-icon { display: inline-flex; width: 20px; height: 20px; flex: 0 0 20px; color: #536471; }
.gy-post-menu-item.is-danger .gy-post-menu-icon { color: #f4212e; }
.gy-post-menu-icon svg { width: 20px; height: 20px; display: block; }
.gy-post-menu-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.gy-visibility-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 20px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(15, 20, 25, 0.06);
    color: #536471;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.gy-visibility-chip svg { width: 12px; height: 12px; display: block; }

.gy-guard-overlay {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 20, 25, 0.45);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 180ms ease, visibility 180ms ease;
}
.gy-guard-overlay.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.gy-guard-card {
    width: min(420px, 100%);
    padding: 26px 24px 22px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 20, 25, 0.28);
    text-align: center;
    transform: translateY(6px) scale(0.98);
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
.gy-guard-overlay.is-open .gy-guard-card { transform: none; }
.gy-guard-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 14px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f6f8;
    color: #536471;
}
.gy-guard-icon svg { width: 26px; height: 26px; }
.gy-guard-card h2 { margin: 0 0 8px; font-size: 20px; font-weight: 800; color: #0f1419; }
.gy-guard-card p { margin: 0; font-size: 14px; line-height: 1.65; color: #536471; }
.gy-guard-actions { display: flex; gap: 10px; margin-top: 20px; }
.gy-guard-primary,
.gy-guard-secondary {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
}
.gy-guard-primary { background: #0f1419; color: #fff; }
.gy-guard-secondary { background: #fff; color: #0f1419; box-shadow: inset 0 0 0 1px #cfd9de; }

.gy-post-edit-card {
    width: min(520px, 100%);
    padding: 18px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 20, 25, 0.28);
}
.gy-post-edit-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.gy-post-edit-head h2 { margin: 0; font-size: 17px; font-weight: 800; color: #0f1419; }
.gy-post-edit-head button { width: 34px; height: 34px; border: 0; border-radius: 999px; background: transparent; color: #536471; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.gy-post-edit-head button:hover { background: rgba(15, 20, 25, 0.06); }
.gy-post-edit-head button svg { width: 18px; height: 18px; }
#gyPostEditContent {
    width: 100%;
    min-height: 140px;
    padding: 12px;
    border: 1px solid #cfd9de;
    border-radius: 14px;
    resize: vertical;
    font: inherit;
    font-size: 16px;
    line-height: 1.55;
    color: #0f1419;
    outline: none;
}
#gyPostEditContent:focus { border-color: #1d9bf0; box-shadow: 0 0 0 3px rgba(29, 155, 240, 0.12); }
.gy-post-edit-visibility { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; font-size: 13px; color: #536471; }
.gy-post-edit-visibility > span { font-weight: 700; color: #0f1419; }
.gy-post-edit-visibility label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.gy-post-edit-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.gy-post-edit-actions button { height: 38px; padding: 0 18px; border: 0; border-radius: 999px; font-size: 14px; font-weight: 800; cursor: pointer; }
.gy-post-edit-cancel { background: #eff3f4; color: #0f1419; }
.gy-post-edit-save { background: #0f1419; color: #fff; }
.gy-post-edit-save:disabled { opacity: 0.6; cursor: progress; }

.gy-post-toast {
    position: fixed;
    z-index: 460;
    left: 50%;
    bottom: 26px;
    transform: translate(-50%, 12px);
    padding: 10px 16px;
    border-radius: 999px;
    background: #0f1419;
    color: #fff;
    font-size: 13px;
    font-weight: 650;
    opacity: 0;
    pointer-events: none;
    transition: 0.2s;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
    max-width: min(90vw, 460px);
    text-align: center;
}
.gy-post-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.gy-post-toast[data-type="error"] { background: #be123c; }

/* 顶栏：帖子详情 / 设置可保留圆角；个人主页顶栏贴齐栏宽（对齐 X，避免与侧栏接缝穿帮） */
.gy-detail-header,
.gy-settings-header {
    background: rgba(255, 255, 255, 0.88) !important;
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
    border: 1px solid rgba(15, 20, 25, 0.06);
    border-radius: 0 0 22px 22px;
    box-shadow: 0 8px 24px rgba(15, 20, 25, 0.06);
    margin: 0 8px;
}
.gy-profile-header {
    background: rgba(255, 255, 255, 0.85) !important;
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    width: 100%;
}
@media (min-width: 768px) {
    .gy-detail-header,
    .gy-settings-header {
        margin: 10px 14px 0;
        border-radius: 22px;
    }
    .gy-profile-header {
        margin: 0;
        border-radius: 0;
    }
}

/* 个人主页「编辑个人资料」：白字 + 黑底胶囊（原先是透明描边按钮） */
.gy-profile-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 18px;
    border: 1px solid #0f1419;
    border-radius: 999px;
    background: #0f1419;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(15, 20, 25, 0.14);
    transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.gy-profile-edit-btn:hover { background: #272c30; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(15, 20, 25, 0.18); }
.gy-profile-edit-btn:active { transform: none; }

/* ============================================================
   设置和隐私：对齐 X.com 的行式布局（分组标题 + 细分割线 + 右侧状态）
   ============================================================ */
.gy-settings-page { background: #fff; min-height: 100%; }
.gy-settings-group-title {
    padding: 14px 16px 6px;
    font-size: 13px;
    font-weight: 800;
    color: #536471;
    letter-spacing: .01em;
}
.gy-settings-section {
    border: 1px solid #eff3f4;
    border-radius: 18px;
    margin: 0 12px 14px;
    overflow: hidden;
    background: #fff;
}
.gy-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    padding: 15px 16px;
    border-bottom: 1px solid #eff3f4;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color 130ms ease;
}
.gy-settings-row:last-child { border-bottom: 0; }
.gy-settings-row:hover { background: #f7f9f9; }
.gy-settings-row-main { display: flex; align-items: flex-start; gap: 13px; min-width: 0; }
.gy-settings-row-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    margin-top: 1px;
    color: #0f1419;
}
.gy-settings-row-icon svg { width: 22px; height: 22px; display: block; }
.gy-settings-row-icon img { width: 22px; height: 22px; object-fit: contain; display: block; }
.gy-settings-row-title { font-size: 15px; font-weight: 700; color: #0f1419; line-height: 1.35; }
.gy-settings-row-desc { margin-top: 3px; font-size: 13px; line-height: 1.5; color: #536471; }
.gy-settings-row-meta { margin-top: 4px; font-size: 12.5px; font-weight: 700; color: #536471; }
.gy-settings-row-meta.is-on { color: #00ba7c; }
.gy-settings-row-chevron { flex: 0 0 auto; color: #536471; display: inline-flex; }
.gy-settings-row-chevron svg { width: 18px; height: 18px; }
.gy-settings-account-card { display: flex; align-items: center; gap: 12px; padding: 16px; margin: 12px; border: 1px solid #eff3f4; border-radius: 18px; }
.gy-settings-account-card img { width: 48px; height: 48px; border-radius: 999px; object-fit: cover; background: #cfd9de; }
.gy-settings-switch { position: relative; width: 46px; height: 26px; flex: 0 0 auto; border: 0; border-radius: 999px; background: #cfd9de; cursor: pointer; transition: background-color 160ms ease; }
.gy-settings-switch span { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left 160ms ease; }
.gy-settings-switch[data-enabled="1"] { background: #1d9bf0; }
.gy-settings-switch[data-enabled="1"] span { left: 23px; }

/* TOTP 二维码（本地生成，不引用任何远程图片） */
.gy-totp-box { margin-top: 12px; padding: 14px; border: 1px solid #eff3f4; border-radius: 16px; background: #f7f9f9; }
.gy-totp-qr { display: flex; justify-content: center; padding: 10px; background: #fff; border-radius: 14px; border: 1px solid #e1e8ed; }
.gy-totp-qr canvas, .gy-totp-qr img { display: block; width: 168px; height: 168px; image-rendering: pixelated; }
.gy-totp-secret { margin-top: 10px; font-size: 12px; color: #536471; word-break: break-all; text-align: center; }
.gy-totp-secret code { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 12.5px; color: #0f1419; background: #fff; border: 1px solid #e1e8ed; border-radius: 8px; padding: 3px 6px; }
.gy-totp-steps { margin: 8px 0 0; padding-left: 18px; font-size: 12px; line-height: 1.7; color: #536471; }

/* 首页发帖器「可见范围」切换（所有人可见 / 仅注册用户可见） */
.gy-home-compose-visibility {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding-left: 52px;
    margin-top: 8px;
}
.gy-visibility-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 10px;
    border: 1px solid #cfd9de;
    border-radius: 999px;
    background: #fff;
    color: #536471;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}
.gy-visibility-btn svg { width: 14px; height: 14px; display: block; }
.gy-visibility-btn:hover { background: #f7f9f9; }
.gy-visibility-btn.is-active { background: #0f1419; border-color: #0f1419; color: #fff; }
.gy-visibility-btn:disabled { opacity: .5; cursor: not-allowed; }
.gy-home-compose-review-hint { font-size: 11px; color: #8294a1; }
.gy-compose-visibility-select {
    height: 30px;
    margin-left: 4px;
    padding: 0 8px;
    border: 1px solid #cfd9de;
    border-radius: 999px;
    background: #fff;
    color: #0f1419;
    font-size: 12px;
    font-weight: 700;
    outline: none;
    cursor: pointer;
}
.gy-compose-visibility-select:focus { border-color: #1d9bf0; }
.chat-limit-hint { display: block; }
@media (max-width: 420px) {
    .gy-home-compose-visibility { padding-left: 48px; }
}

/* 文章正文扩展组件：侧边目录 / 代码块 / 参数栏 */
.gy-article-body .gy-article-toc-block[data-gy-toc] { display: block; }
.gy-article-body .gy-code-block {
    margin: 1.1em 0;
    border: 1px solid #e1e8ed;
    border-radius: 14px;
    overflow: hidden;
    background: #0f1419;
}
.gy-article-body .gy-code-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.gy-article-body .gy-code-lang {
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
}
.gy-article-body .gy-code-head .gy-copy-btn {
    position: static;
    padding: 5px 11px;
    font-size: 11.5px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}
.gy-article-body .gy-code-block pre {
    margin: 0;
    padding: 14px 16px;
    overflow-x: auto;
    background: transparent;
}
.gy-article-body .gy-code-block code {
    font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #e6edf3;
    white-space: pre;
}
.gy-article-body .gy-param-panel {
    margin: 1.2em 0;
    border: 1px solid #e1e8ed;
    border-radius: 16px;
    overflow: hidden;
    background: #f7f9fa;
}
.gy-article-body .gy-param-title {
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 800;
    color: #0f1419;
    background: #fff;
    border-bottom: 1px solid #e1e8ed;
}
.gy-article-body .gy-param-row {
    display: grid;
    grid-template-columns: minmax(90px, 34%) minmax(0, 1fr);
    gap: 10px;
    padding: 9px 14px;
    border-bottom: 1px solid #e8eef2;
    font-size: 13.5px;
}
.gy-article-body .gy-param-row:last-child { border-bottom: 0; }
.gy-article-body .gy-param-key {
    font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
    font-weight: 700;
    color: #0f1419;
    word-break: break-word;
}
.gy-article-body .gy-param-val { color: #536471; word-break: break-word; }
@media (max-width: 640px) {
    .gy-article-body .gy-param-row { grid-template-columns: minmax(0, 1fr); gap: 3px; }
}

/* 游客列表里的锁定提示（强制登录开启 / 仅注册用户可见） */
.gy-locked-teaser {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 2px 0 0;
    padding: 7px 12px;
    border: 1px dashed #cfd9de;
    border-radius: 12px;
    background: #f7f9f9;
    color: #536471;
    font-size: 13.5px;
    font-weight: 650;
}





/* ========== X.com-style profile hero ========== */
.gy-profile-hero {
    position: relative;
    background: #fff;
    /* 允许头像向上叠到头图上，父级不要裁切 */
    overflow: visible;
}
/* Banner: 1500×500 → 3:1，通栏贴齐中栏左右边（与侧栏接缝干净） */
.gy-profile-banner {
    position: relative;
    z-index: 1;
    width: 100%;
    aspect-ratio: 3 / 1;
    background: #cfd9de;
    overflow: hidden;
    isolation: isolate;
}
.gy-profile-banner--empty {
    background: linear-gradient(180deg, #cfd9de 0%, #e7e9ea 100%);
}
.gy-profile-banner-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    /* 禁止把层叠抬到头像之上 */
    position: relative;
    z-index: 0;
}
/* 头像行必须在头图之上 */
.gy-profile-hero-bar {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 12px 16px 0;
    min-height: 68px;
    pointer-events: none; /* 空白处点穿，按钮单独恢复 */
}
.gy-profile-hero-bar > * {
    pointer-events: auto;
}
.gy-profile-avatar-wrap {
    position: relative;
    z-index: 6;
    margin-top: calc(-1 * (68px * 0.5 + 2px));
    width: 68px;
    height: 68px;
    flex-shrink: 0;
    border-radius: 999px;
    background: #fff;
    padding: 3px;
    box-sizing: content-box;
    box-shadow: 0 0 0 2px #fff;
}
.gy-profile-avatar {
    display: block;
    width: 68px;
    height: 68px;
    border-radius: 999px;
    object-fit: cover;
    background: #cfd9de;
    position: relative;
    z-index: 1;
}
.gy-profile-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-height: 36px;
    padding-top: 4px;
    position: relative;
    z-index: 6;
}
/* 覆盖前面的黑底样式：个人页操作钮用 X 白底描边；「编辑」可保持深色 */
.gy-profile-hero .gy-profile-edit-btn {
    height: 36px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid #cfd9de;
    background: #fff;
    color: #0f1419;
    font-size: 14px;
    font-weight: 700;
    line-height: 34px;
    cursor: pointer;
    box-shadow: none;
    transition: background-color 120ms ease;
}
.gy-profile-hero .gy-profile-edit-btn:hover {
    background: #f7f9f9;
    transform: none;
    box-shadow: none;
}
.gy-profile-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid #cfd9de;
    background: #fff;
    color: #0f1419;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.gy-profile-icon-btn:hover { background: #f7f9f9; }
.gy-profile-meta {
    position: relative;
    z-index: 2;
    padding: 4px 16px 16px;
}
.gy-profile-name {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    line-height: 24px;
    color: #0f1419;
    word-break: break-word;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}
.gy-profile-handle {
    margin: 2px 0 0;
    font-size: 15px;
    line-height: 20px;
    color: #536471;
}
.gy-profile-bio {
    margin-top: 12px;
    font-size: 15px;
    line-height: 20px;
    color: #0f1419;
    white-space: pre-line;
    word-break: break-word;
}
.gy-profile-join {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 12px;
    font-size: 15px;
    line-height: 20px;
    color: #536471;
}
.gy-profile-join img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    opacity: 0.75;
}
.gy-profile-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 12px;
    font-size: 14px;
    line-height: 16px;
    color: #536471;
}
.gy-profile-stats b {
    color: #0f1419;
    font-weight: 700;
    margin-right: 4px;
}
@media (min-width: 640px) {
    .gy-profile-avatar-wrap {
        margin-top: calc(-1 * (112px * 0.5 + 2px));
        width: 112px;
        height: 112px;
        padding: 4px;
        box-shadow: 0 0 0 2px #fff;
    }
    .gy-profile-avatar {
        width: 112px;
        height: 112px;
    }
    .gy-profile-hero-bar {
        min-height: 72px;
        padding: 12px 16px 0;
    }
    .gy-profile-name { font-size: 20px; }
}

/* 中栏与侧栏接缝：个人页头图通栏，去掉多余圆角裁切感 */
#layout-main {
    background: #fff;
}
#layout-main .gy-profile-hero,
#layout-main .gy-profile-banner {
    border-radius: 0;
}

/* ===================== 文章：话题标签 / 附件 / 背景音乐名片 ===================== */
.gy-article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.gy-article-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    background: #eff7ff;
    border: 1px solid #cfe6ff;
    color: #1d9bf0;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.8;
    text-decoration: none;
    transition: background .18s ease, border-color .18s ease;
}
.gy-article-tag:hover {
    background: #e0f0ff;
    border-color: #a9d6ff;
    text-decoration: none;
}
.gy-article-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 8px;
    border-radius: 999px;
    background: #eff7ff;
    color: #1d9bf0;
    font-size: 11.5px;
    font-weight: 600;
}
.gy-article-meta-chip i { font-size: 10.5px; }
.gy-article-pin { color: #1d9bf0; font-size: 12px; flex: none; }

/* 搜索结果分区 */
.gy-search-section + .gy-search-section { border-top: 1px solid #e8eef2; }
.gy-search-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 8px;
}
.gy-search-section-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    color: #0f1419;
}
.gy-search-section-title i { color: #1d9bf0; font-size: 12px; }
.gy-search-section-count {
    padding: 1px 8px;
    border-radius: 999px;
    background: #f1f3f5;
    color: #536471;
    font-size: 11.5px;
    font-weight: 700;
}

/* 附件下载区 */
.gy-article-attachments {
    margin-top: 28px;
    padding: 14px 16px 16px;
    border: 1px solid #e8eef2;
    border-radius: 16px;
    background: #fbfdff;
}
.gy-attach-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13.5px;
    font-weight: 800;
    color: #0f1419;
}
.gy-attach-head i { color: #1d9bf0; font-size: 12.5px; }
.gy-attach-count {
    padding: 0 8px;
    border-radius: 999px;
    background: #e8f3ff;
    color: #1d9bf0;
    font-size: 11.5px;
    font-weight: 700;
}
.gy-attach-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.gy-attach-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #eaf0f4;
    border-radius: 12px;
    background: #fff;
}
.gy-attach-icon {
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #475569;
    font-size: 16px;
}
.gy-attach-icon .gy-attach-zip { color: #d97706; }
.gy-attach-icon .gy-attach-exe { color: #4f46e5; }
.gy-attach-icon .gy-attach-apk { color: #059669; }
.gy-attach-icon .gy-attach-pdf { color: #dc2626; }
.gy-attach-icon .gy-attach-file { color: #64748b; }
.gy-attach-icon:has(.gy-attach-zip) { background: #fff7e6; }
.gy-attach-icon:has(.gy-attach-exe) { background: #eef2ff; }
.gy-attach-icon:has(.gy-attach-apk) { background: #ecfdf5; }
.gy-attach-icon:has(.gy-attach-pdf) { background: #fef2f2; }
.gy-attach-meta { flex: 1; min-width: 0; }
.gy-attach-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #0f1419;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gy-attach-sub { margin-top: 2px; font-size: 11.5px; color: #8b98a5; }
.gy-attach-download {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    background: #0f1419;
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
}
.gy-attach-download:hover { background: #1d9bf0; color: #fff; text-decoration: none; }
