

.st *, .st *::before, .st *::after { box-sizing: border-box; }
.st i, .st em { font-style: normal; }
.st b, .st strong { font-weight: 700; }
.st a { text-decoration: none; color: inherit; }

.st .pn-metric-val {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

.st-sub {
    font-size: 12px;
    color: var(--st-text-3);
    font-weight: 400;
    margin-left: .5rem;
    letter-spacing: 0;
}
@keyframes stSpin { to { transform: rotate(360deg); } }
.st-id-now {
    margin-top: .35rem;
    font-size: .84rem;
    color: var(--st-text-2);
}
.st-id-now b { color: var(--st-theme-deep); }
/* 在线状态胶囊配色：在线/其它=蓝（走 .is-theme），忙碌=红，离开=灰，游戏中=绿 */
.pn-chip.is-busy {
    background: rgba(229, 72, 77, .14);
    border-color: rgba(229, 72, 77, .42);
    color: #e0484d;
}
.pn-chip.is-busy .pn-chip-dot { background: #e0484d; }

.pn-chip.is-away {
    background: var(--st-fill);
    border-color: var(--st-line-soft);
    color: var(--st-text-3);
}
.pn-chip.is-away .pn-chip-dot { background: var(--st-text-3); }

.pn-chip.is-play {
    background: rgba(93, 203, 102, .14);
    border-color: rgba(93, 203, 102, .42);
    color: #1f9d3a;
}
.pn-chip.is-play .pn-chip-dot { background: #5dcb66; }
.pn-chip.is-link { color: var(--st-theme-deep); }
.pn-chip.is-link:hover {
    background: var(--st-theme-soft);
    border-color: color-mix(in srgb, var(--st-theme) 26%, transparent);
}
/* 搜索框样式走公共 .pn-search（common/panel.css），与 B站页共用一份；
   这里只保留本页的输入框 id（#stSearch）。 */

/* ==========================================================================
   2. 游戏库
   ========================================================================== */
.st-games {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 14px;
}
.st-game {
    display: block;
    overflow: hidden;
    border-radius: var(--st-radius);
    background: var(--st-card);
    border: 1px solid var(--P);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.st-game:hover {
    transform: translateY(-3px);
    box-shadow: var(--st-shadow-lg);
    border-color: color-mix(in srgb, var(--st-theme) 35%, var(--st-line));
}
.st-game-cap {
    position: relative;
    aspect-ratio: 460 / 215;
    overflow: hidden;
    background: var(--st-line-soft);
}
.st-game-cap img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform .3s ease;
}
.st-game:hover .st-game-cap img { transform: scale(1.05); }
.st-game-recent {
    position: absolute;
    left: 8px; top: 8px;
    font-size: 11px; font-weight: 600;
    color: #fff;
    padding: 2px 8px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--st-theme) 88%, transparent);
    backdrop-filter: blur(4px);
}
.st-game-body { padding: 10px 12px 12px; }
.st-game-name {
    font-size: 14px; font-weight: 600; line-height: 1.3;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    margin-bottom: 3px;
}
.st-game-time { font-size: 12px; color: var(--st-text-3); }

/* ==========================================================================
   2.5 成就进度
   ========================================================================== */
/* 成就小组标题（即将完成 / 近期获得） */
.st-ach-sub {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 1rem 0 0.5rem 0.5rem;
    font-size: .92rem;
    font-weight: 700;
    letter-spacing: .02em;
    color: color-mix(in srgb, var(--st-theme) 70%, var(--st-text));
}
.st-ach-sub::before {
    content: "";
    width: 4px;
    height: 1.05em;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--st-theme), color-mix(in srgb, var(--st-theme) 40%, transparent));
}
.st-ach-sub em {
    font-size: .74rem;
    font-weight: 600;
    color: var(--st-text-3);
    letter-spacing: .04em;
}
.st-ach-sub.is-recent { color: color-mix(in srgb, var(--st-on) 70%, var(--st-text)); }
.st-ach-sub.is-recent::before {
    background: linear-gradient(180deg, #7ad67a, color-mix(in srgb, var(--st-on) 40%, transparent));
}

.st-ach {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}
.st-ach-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    min-width: 0;
    border-radius: var(--st-radius);
    background: var(--st-card);
    border: 1px solid var(--P);
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.st-ach-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--st-shadow-lg);
    border-color: color-mix(in srgb, var(--st-theme) 35%, var(--st-line));
}
.st-ach-cap {
    flex: 0 0 auto;
    width: 92px;
    height: 43px;
    border-radius: 6px;
    overflow: hidden;
    background: var(--st-line-soft);
}
.st-ach-cap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.st-ach-body {
    flex: 1 1 auto;
    min-width: 0;
}
.st-ach-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}
.st-ach-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--st-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.st-ach-num {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    color: var(--st-theme-deep);
}
.st-ach-num i { font-style: normal; font-weight: 500; color: var(--st-text-3); }
.st-ach-bar {
    height: 6px;
    border-radius: 999px;
    background: var(--st-line-soft);
    overflow: hidden;
}
.st-ach-bar i {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--st-theme), var(--st-theme-deep));
}
.st-ach-pct {
    margin-top: 4px;
    font-size: 11px;
    color: var(--st-text-3);
    text-align: right;
}

/* 近期获得的成就 */
.st-ach-item.is-recent { align-items: flex-start; }
.st-ach-item.is-recent .st-ach-cap { margin-top: 2px; }
/* 成就图标：正方形、不裁切、带一点深色底衬托 */
.st-ach-cap.is-ico {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--st-text) 7%, var(--st-card));
    border: 1px solid var(--st-line-soft);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.st-ach-cap.is-ico img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2px;
    box-sizing: border-box;
    border-radius: 6px;
}
.st-ach-when {
    flex: 0 0 auto;
    font-size: .68rem;
    font-weight: 600;
    color: var(--st-text-3);
    padding: .06rem .42rem;
    border-radius: 999px;
    background: var(--st-fill);
    white-space: nowrap;
}
.st-ach-desc {
    font-size: .74rem;
    line-height: 1.45;
    color: var(--st-text-2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.1em;
}
.st-ach-game {
    margin-top: .28rem;
    font-size: .72rem;
    color: var(--st-text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   3. 好友墙
   ========================================================================== */
.st-friends {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 12px;
    margin-bottom: var(--margin);
}
.st-friend {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 14px 6px;
    border-radius: var(--st-radius);
    background: var(--st-card);
    border: 1px solid var(--st-line-soft);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.st-friend:hover {
    transform: translateY(-2px);
    box-shadow: var(--st-shadow);
    border-color: var(--st-line);
}
.st-friend-ava {
    position: relative;
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--st-line-soft);
}
.st-friend-ava img { width: 100%; height: 100%; 
    border-radius: 50%;object-fit: cover; display: block; }
.st-friend-txt {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 800; color: var(--st-theme);
    background: var(--st-theme-soft);
}
.st-friend-dot {
    position: absolute;
    right: -2px; bottom: -2px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #9aa5b1;
    border: 2.5px solid var(--st-card);
    box-sizing: border-box;
}
.st-friend-dot.is-on { background: var(--st-on); }
.st-friend-name {
    font-size: 12px; color: var(--st-text-2);
    max-width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pn-empty-d code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--st-line-soft);
    color: var(--st-theme-deep);
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 680px) {
    .pn-hero-in { padding: 1.15rem 1.1rem; gap: 1rem; }
    .pn-pfp { width: 72px; height: 72px; }
    .pn-pfp-txt { font-size: 1.6rem; }
    .pn-id-name { font-size: 1.22rem; }
    .pn-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pn-metric { padding: .8rem .3rem .85rem; }
    .pn-metric-val { font-size: 1.15rem; }
    .pn-metric-key { font-size: .66rem; }
    .st-games { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .st-ach { grid-template-columns: 1fr; }
    .st-friends { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
    .pn-bar-tools { flex-direction: column; align-items: stretch; }
    .pn-sorts { justify-content: center; }
}
