:root {
    --bg: #f6f4ef;
    --panel: rgba(255, 255, 255, 0.86);
    --line: rgba(32, 32, 28, 0.1);
    --text: #1a1a16;
    --muted: #6a685f;
    --accent: #1f4d3d;
}

* {
    box-sizing: border-box;
}

body,
body * {
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(202, 184, 140, 0.22), transparent 34%),
        linear-gradient(180deg, #fbfaf7 0%, var(--bg) 100%);
    color: var(--text);
    font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

a,
a:hover {
    text-decoration: none;
}

.page-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 28px 16px;
}

.shell {
    position: relative;
    width: min(760px, calc(100vw - 32px));
    margin: 0;
    min-height: 1000px;
    padding: 14px 18px 14px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    background: var(--panel);
    box-shadow: 0 18px 50px rgba(50, 43, 22, 0.08);
    backdrop-filter: blur(10px);
}

.category-nav {
    position: absolute;
    right: 100%;
    top: 30px;
    width: 48px;
    pointer-events: none;
}

.category-item {
    position: absolute;
    right: 0;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 12px;
    background: transparent;
    border: 1px solid transparent;
    border-right: none;
    border-radius: 10px 0 0 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

.category-item:hover {
    padding-left: 30px;
    padding-right: 14px;
    background: rgba(249, 249, 248, 1);
    box-shadow: -4px 2px 16px rgba(31, 77, 61, 0.08);
    backdrop-filter: blur(8px);
}

.category-item.active {
    padding-left: 30px;
    padding-right: 16px;
    background: rgba(249, 249, 248, 1);
    border-right: none;
    box-shadow: -4px 2px 16px rgba(31, 77, 61, 0.1);
    backdrop-filter: blur(10px);
}

.category-short {
    position: absolute;
    right: 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
    transition: opacity 0.15s;
}

.category-item:hover .category-short,
.category-item.active .category-short {
    opacity: 0;
}

.category-full {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.25s 0.08s;
}

.category-item:hover .category-full,
.category-item.active .category-full {
    opacity: 1;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.header-main {
    min-width: 0;
}

.auth-entry {
    flex-shrink: 0;
    padding-top: 2px;
    color: var(--accent);
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
}

.kicker {
    margin: 0 0 6px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: 22px;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.feed-pull-shell {
    position: relative;
    overflow: hidden;
}

.refresh-indicator,
.feed-status {
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.refresh-indicator {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 0;
    display: flex;
    justify-content: center;
    padding-top: 6px;
    opacity: 0;
    transform: translateY(-56px);
    transition: opacity 0.18s ease, transform 0.22s ease;
    pointer-events: none;
}

.refresh-indicator.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.refresh-indicator__panel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 8px;
    color: #8e8e93;
    font-size: 13px;
    font-weight: 500;
}

.refresh-indicator.is-ready .refresh-indicator__panel {
    color: #6f6f73;
}

.refresh-indicator.is-success .refresh-indicator__panel {
    color: #8e8e93;
}

.refresh-indicator.is-error .refresh-indicator__panel {
    color: #8e8e93;
}

.feed-body {
    position: relative;
    z-index: 1;
    background: inherit;
    transform: translate3d(0, var(--feed-offset, 0px), 0);
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.item {
    padding: 10px 0;
    border-top: 1px solid var(--line);
}

.title-main {
    min-width: 0;
}

.title-wrap {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.title {
    min-width: 0;
    max-width: 70%;
    overflow: hidden;
    color: #2d2d2d;
    font-size: 15px;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: break-word;
}

.title:hover {
    color: var(--accent);
}

.cat-tag {
    display: inline-flex;
    width: 20px;
    height: 20px;
    justify-content: center;
    align-items: center;
    border-radius: 3px;
    line-height: 20px;
    font-size: 15px;
    font-weight: 500;
    color: #fff;
    flex-shrink: 0;
}

.tone-1 {
    background: #cf5a45;
}

.tone-2 {
    background: #ca8a2c;
}

.tone-3 {
    background: #2f7d5b;
}

.tone-4 {
    background: #3f6bb3;
}

.tone-5 {
    background: #8a5ab8;
}

.tone-6 {
    background: #58616f;
}

.comment-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 5px;
    gap: 4px;
    color: #bbbbbb;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
    vertical-align: middle;
}

.comment-badge svg {
    width: 14px;
    height: 14px;
    stroke: #bbbbbb;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.time-badge {
    margin-left: auto;
    padding-left: 12px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
}

.empty {
    padding: 28px 0 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

.feed-status {
    margin-top: 6px;
}

.feed-sentinel {
    height: 1px;
}

.pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.pager-link {
    color: var(--accent);
    font-size: 13px;
    padding: 2px 6px;
}

.site-footer {
    width: 100%;
    margin-top: 40px;
    padding: 30px 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.footer-content {
    margin-bottom: 10px;
    line-height: 1.6;
}

.footer-icp {
    color: #999;
    font-size: 13px;
}

.mobile-tabbar {
    display: none;
}

.mobile-tabbar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 50px;
    border-radius: 14px;
    color: #7a8e99;
    font-size: 11px;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.16s ease, opacity 0.16s ease;
}

.mobile-tabbar__item,
.mobile-tabbar__item * {
    -webkit-tap-highlight-color: transparent;
}

.mobile-tabbar__item:focus,
.mobile-tabbar__item:focus-visible {
    outline: none;
    box-shadow: none;
}

.mobile-tabbar__item.active {
    color: var(--accent);
    background: rgba(31, 77, 61, 0.08);
}

.mobile-tabbar__item:active {
    background: transparent;
    transform: translateY(1px) scale(0.98);
    opacity: 0.86;
}

.mobile-tabbar__icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
    justify-content: center;
    align-items: center;
}

.mobile-tabbar__icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.mobile-tabbar__label {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

@media (max-width: 640px) {
    .shell {
        width: min(100vw, 760px);
        margin: 0;
        padding: 14px 14px 98px;
        border-radius: 0;
        height: auto;
        min-height: 100vh;
        border: none;
        box-shadow: none;
        background: #fff;
    }

    .footer-icp {
        font-size: 12px;
    }

    .site-footer {
        background: #fff;
        margin-top: 0 !important;
        padding-bottom: 98px;
        font-size: 12px !important;
    }

    .page-container {
        padding: 0;
    }

    .header {
        align-items: center;
    }

    .category-nav {
        display: none;
    }

    .title {
        max-width: 62%;
        font-size: 14px;
    }

    .title-wrap {
        gap: 5px;
    }

    .pager {
        display: none;
    }
}

@media (max-width: 768px) {
    .mobile-tabbar {
        position: fixed;
        right: 16px;
        bottom: 12px;
        left: 16px;
        z-index: 9999;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
        border: 1px solid rgba(32, 30, 24, 0.08);
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 14px 28px rgba(31, 28, 22, 0.12);
        backdrop-filter: blur(16px);
    }
}
