/* 素帖主题：基础（变量、顶栏、骨架） */
/* =========================================================
   素帖 · 极简主题
   参考 gao.gs 的浅色网格 + 三栏列表结构
   独立主题：不依赖 Motan
   ========================================================= */

.st-theme {
    --gs-bg: #fffcf8;
    --gs-card: #ffffff;
    --gs-text: #333333;
    --gs-sub: #555555;
    --gs-muted: #5f6b63;
    --gs-faint: #6b716a;
    --gs-line: #e9e9e9;
    --gs-line-light: #f2f2f2;
    --gs-green: #1f7a3d;
    --gs-green-2: #17602f;
    --gs-solid: #1f7a3d;
    --gs-solid-2: #17602f;
    --gs-accent: #0dbc79;
    --gs-soft: #eef9f1;
    --gs-tag-bg: #fbfbfb;
    --gs-hover: #fafafa;
    --gs-radius: 16px;
    --gs-card-radius: 8px;
    /* 兼容部分插件使用的变量名 */
    --card: var(--gs-card);
    --line: var(--gs-line);
    --red: #e03131;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
    background-color: var(--gs-bg);
    background-image:
        linear-gradient(rgba(212, 212, 212, .42) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 212, 212, .42) 1px, transparent 1px);
    background-size: 32px 32px;
    background-attachment: fixed;
    color: var(--gs-text);
    font: 13px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.st-theme a { color: var(--gs-sub); text-decoration: none; }
.st-theme a:hover { color: var(--gs-green); text-decoration: none; }
.st-theme img { max-width: 100%; }

/* 无障碍：仅供屏幕阅读器 */
.st-theme .st-sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.st-theme .st-skip {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 200;
    padding: 8px 12px;
    font-size: 12px;
    color: #fff;
    background: var(--gs-solid);
    border-radius: 4px;
    transform: translateY(-160%);
    transition: transform .15s;
}
.st-theme .st-skip:focus { transform: translateY(0); color: #fff; }

/* ---------- 顶栏 ---------- */

.st-theme .container { max-width: 1100px; }
.st-theme .st-navbar {
    position: sticky;
    top: 0;
    z-index: 30;
    padding: 0;
    background: rgba(255, 255, 255, .94);
    border-top: 0;
    border-bottom: 1px solid #ececec;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .03);
}
@supports (backdrop-filter: blur(1px)) {
    .st-theme .st-navbar { background: rgba(255, 255, 255, .84); backdrop-filter: saturate(180%) blur(12px); }
}
/* 与下方 1100px 内容列左右对齐；窄屏由 1360 断点补内边距 */
.st-theme .st-nav-in {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 14px;
    width: 100%;
    max-width: 1100px;
    height: 48px;
    margin: 0 auto;
    padding: 0;
}
.st-theme .st-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .01em;
    color: var(--gs-text);
    text-decoration: none;
    white-space: nowrap;
}
.st-theme .st-brand:hover { color: var(--gs-green); text-decoration: none; }
.st-theme .st-logo {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .14);
}

.st-theme .st-nav { display: flex; align-items: center; align-self: center; gap: 2px; height: 30px; margin-left: 4px; padding: 0 !important; }
.st-theme .st-nav a {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 11px;
    font-size: 13px;
    color: var(--gs-muted);
    border-radius: 6px;
    text-decoration: none;
    transition: color .12s, background .12s;
}
.st-theme .st-nav a:hover { color: var(--gs-green); background: #f3f7f3; text-decoration: none; }
.st-theme .st-nav a.is-active { color: var(--gs-green); font-weight: 600; background: var(--gs-soft); }

/* 搜索 */
.st-theme .st-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 200px;
    max-width: 30vw;
    margin-left: auto;
}
.st-theme .st-search svg { position: absolute; right: 10px; color: #a3a3a3; pointer-events: none; }
.st-theme .st-search input {
    width: 100%;
    height: 32px;
    padding: 0 30px 0 12px;
    font-size: 12.5px;
    color: var(--gs-text);
    background: #fff;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .04);
    transition: border-color .15s, box-shadow .15s;
}
.st-theme .st-search input::placeholder { color: #a6a6a6; }
.st-theme .st-search input:focus {
    outline: none;
    border-color: var(--gs-green);
    box-shadow: 0 0 0 3px rgba(46, 164, 79, .13);
}

.st-theme .st-actions { display: flex; align-items: center; flex-shrink: 0; gap: 6px; margin: 0; padding: 0; list-style: none; }
.st-theme .st-actions > li { display: flex; align-items: center; }
.st-theme .st-post {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    margin-right: 4px;
    padding: 0 13px;
    font-size: 12.5px;
    font-weight: 500;
    color: #fff;
    background: var(--gs-solid);
    border-radius: 6px;
    white-space: nowrap;
}
.st-theme .st-post:hover { color: #fff; background: var(--gs-solid-2); text-decoration: none; }
.st-theme .st-link {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 10px;
    font-size: 13px;
    color: var(--gs-muted);
    border-radius: 6px;
    white-space: nowrap;
    transition: color .12s, background .12s;
}
.st-theme .st-link:hover { color: var(--gs-green); background: #f3f7f3; text-decoration: none; }
.st-theme .st-link-cta {
    padding: 0 13px;
    color: var(--gs-text);
    background: #fff;
    border: 1px solid var(--gs-line);
}
.st-theme .st-link-cta:hover { color: var(--gs-green); background: #fff; border-color: var(--gs-green); }
.st-theme .st-usermenu { position: relative; }
.st-theme .st-user-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 8px 0 4px;
    font-size: 13px;
    color: var(--gs-text);
    background: none;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    transition: background .12s;
}
.st-theme .st-user-btn:hover { background: #f3f7f3; }
.st-theme .st-user-btn img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--gs-line); }
.st-theme .st-user-btn svg { color: #6b716a; }
.st-theme .st-usermenu-list {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 50;
    min-width: 152px;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--gs-line);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
}
.st-theme .st-usermenu.is-open .st-usermenu-list { display: block; }
.st-theme .st-usermenu-list a {
    display: block;
    padding: 7px 10px;
    font-size: 13px;
    color: var(--gs-sub);
    border-radius: 4px;
}
.st-theme .st-usermenu-list a:hover { color: var(--gs-green); background: #f7f7f7; }
.st-theme .st-usermenu-sep { display: block; height: 1px; margin: 5px 4px; background: var(--gs-line); }

.st-theme .st-actions .am-nav-msg .nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 13px;
    color: var(--gs-muted);
    border-radius: 6px;
}
.st-theme .st-actions .am-nav-msg .nav-link span.d-none.d-lg-inline { display: none !important; }
.st-theme .st-actions .am-nav-msg .nav-link:hover { color: var(--gs-green); background: #f3f7f3; }
.st-theme .st-actions .am-nav-msg .am-nav-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    min-width: 16px;
    height: 16px;
    margin: 0;
    padding: 0 4px;
    font-family: var(--mono, inherit);
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    color: #fff;
    background: #e03131;
    border-radius: 8px;
    box-shadow: 0 0 0 2px var(--gs-bg, #fff);
}

/* ---------- 骨架：左栏 + 大卡片 ---------- */

.st-theme #body { padding: 24px 0 0; background: transparent; }

/* 首页 / 版块 / 热门 / 搜索：让大卡片自己控制 1100px 宽度，和左侧固定栏对齐 */
.st-theme.route-index #body > .container,
.st-theme.route-hot #body > .container,
.st-theme.route-search #body > .container,
.st-theme.route-forum #body > .container {
    max-width: none;
    width: auto;
    padding: 0;
}
.st-theme .gs-shell {
    display: block;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 0 40px;
}

/* 左侧版块：固定在大卡片左侧，和 gao.gs 一样 */
.st-theme .gs-rail {
    position: fixed;
    top: 64px;
    left: max(16px, calc((100vw - 1100px) / 2 - 120px));
    width: 100px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}
.st-theme .gs-rail a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 6px;
    font-size: 13px;
    color: #666;
    border-radius: 7px;
    white-space: nowrap;
}
.st-theme .gs-rail a svg { flex-shrink: 0; color: #6b716a; width: 17px; height: 17px; }
.st-theme .gs-rail a:hover { color: var(--gs-green); background: #f7f7f7; }
.st-theme .gs-rail a:hover svg { color: var(--gs-green); }
.st-theme .gs-rail a.is-active { color: var(--gs-green); background: var(--gs-soft); font-weight: 600; }
.st-theme .gs-rail a.is-active svg { color: var(--gs-green); }

/* 白色大卡片 */
.st-theme .gs-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 20px;
    align-items: start;
    min-width: 0;
    padding: 25px 30px;
    background: #fff;
    border-radius: var(--gs-radius);
    box-shadow: 0 3px 10px rgba(0, 0, 0, .08);
}
.st-theme .gs-main { min-width: 0; }
.st-theme .gs-side { position: sticky; top: 64px; align-self: start; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.st-theme .gs-side-stack { display: flex; flex-direction: column; gap: 12px; }

/* ---------- 列表 ---------- */

.st-theme .gs-control { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 6px; }
.st-theme .gs-sorter,
.st-theme .gs-hot-ranges { flex: 0 0 auto; }
.st-theme .gs-sorter a,
.st-theme .gs-hot-ranges a,
.st-theme .gs-post-btn { white-space: nowrap; }