* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    color: #0f172a;
    background-color: #cfe8ff;
    background-image: url("/images/pattern-bg.svg");
    background-repeat: repeat;
    background-size: auto;
    background-position: top left;
    background-attachment: fixed;
}

.top-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: center;
    padding: 14px 16px 10px;
    background-color: #f8fafc;
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.top-nav-inner {
    width: 100%;
    max-width: 720px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.top-nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-nav-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.top-nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #6b7280;
}

.top-nav-active-tag {
    font-size: 12px;
    color: #4b5563;
}

.top-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    text-decoration: none;
}

.top-nav-link:hover {
    text-decoration: underline;
}

.top-nav-link-icon {
    display: block;
    width: 22px;
    height: 22px;
}

.page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 32px 12px;
}

.feed {
    width: 100%;
    max-width: 720px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feed-shell {
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.feed-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 4px;
    letter-spacing: -0.02em;
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.3);
}

.feed-subtitle {
    margin: 0 0 4px;
    font-size: 12px;
    color: #4b5563;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.9);
}

.feed-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.feed-loader {
    margin-top: 12px;
    font-size: 12px;
    color: #6b7280;
    text-align: center;
}

.feed-item {
    position: relative;
    width: 100%;
    padding: 10px 14px 8px;
    border-radius: 18px;
    background-color: rgba(248, 250, 252, 0.96);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.feed-item--single {
    padding: 14px 16px 10px;
}

.feed-item-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 0;
}

.feed-item-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.feed-item-title-link {
    color: inherit;
    text-decoration: none;
}

.feed-item-title-link:hover {
    text-decoration: underline;
}

.feed-item-time {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    white-space: nowrap;
    text-align: right;
}

.feed-item-quote {
    margin: 4px 0 6px;
    padding: 6px 8px;
    border-radius: 10px;
    background-color: #e5f0ff;
    border-left: 3px solid #60a5fa;
    font-size: 16px;
    color: #1e293b;
    white-space: pre-line;
}

.feed-item-body {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #0f172a;
    white-space: pre-line;
}

.feed-item-tags {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 16px;
    color: #3b82f6;
}

.feed-item-tag {
    white-space: nowrap;
    color: #3b82f6;
    text-decoration: none;
    cursor: pointer;
}

.feed-item-tag:hover {
    text-decoration: underline;
}

.back-to-top {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: none;
    background: rgba(15, 23, 42, 0.75);
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.35);
    z-index: 50;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
    transform: translateY(0);
}

.back-to-top--visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.feed-back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
    font-size: 12px;
    color: #3b82f6;
    text-decoration: none;
}

.feed-back-link:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .feed {
        max-width: 100%;
    }

    .feed-item {
        padding: 9px 10px 7px;
        border-radius: 16px;
    }

    .feed-item-title {
        font-size: 15px;
    }

    .feed-item-body {
        font-size: 15px;
    }

    .feed-item-quote {
        font-size: 15px;
    }

    .feed-item-tags {
        font-size: 15px;
    }
}

