:root {
    --bg: #fcfcfc;
    --text: #333;
    --border: #ddd;
    --accent: #eee;
    --top-bar: #fff;
    --font-main: 'Segoe UI', system-ui, sans-serif;
    --font-code: 'Courier New', Courier, monospace;
}

body, html {
    margin: 0; padding: 0; min-height: 100%;
    font-family: var(--font-main);
    background: var(--bg); color: var(--text);
}

/* TOP BAR */
.top-bar {
    display: flex; align-items: center;
    padding: 10px 15px; background: var(--top-bar);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
}
.wordmark {
    font-weight: bold; font-size: 16px; color: var(--text);
    text-decoration: none;
}

/* CONTENT */
.content { max-width: 680px; margin: 0 auto; padding: 30px 20px; box-sizing: border-box; }

.view { display: none; flex-direction: column; }
.view.active { display: flex; }

/* LIST */
#postList { display: flex; flex-direction: column; }
.post-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 0; border-bottom: 1px solid var(--border);
    cursor: pointer; gap: 12px;
}
.post-item:hover .post-item-title { text-decoration: underline; }
.post-thumb {
    width: 52px; height: 52px; object-fit: cover;
    border-radius: 4px; flex-shrink: 0;
}
.post-item-title { font-weight: bold; font-size: 15px; flex: 1; }
.post-item-date { font-size: 12px; color: #888; flex-shrink: 0; }

.empty-state { color: #aaa; font-size: 14px; padding: 40px 0; text-align: center; }

/* BACK BUTTON */
.back-btn {
    background: none; border: none; padding: 0; margin-bottom: 24px;
    cursor: pointer; font-size: 13px; color: #888;
    font-family: var(--font-main); align-self: flex-start;
}
.back-btn:hover { color: var(--text); }

/* POST */
#postTitle { font-size: 22px; margin: 0 0 6px; line-height: 1.3; }
.post-meta { font-size: 12px; color: #888; margin-bottom: 28px; }
.post-body { line-height: 1.7; font-size: 15px; }
.post-body h1, .post-body h2, .post-body h3 { margin-top: 1.5em; }
.post-body p { margin: 0.8em 0; }
.post-body pre { background: var(--accent); padding: 12px; border-radius: 4px; overflow-x: auto; }
.post-body code { font-family: var(--font-code); font-size: 13px; }
.post-body p code { background: var(--accent); padding: 1px 5px; border-radius: 3px; }
.post-body a { color: #0070f3; }
.post-body blockquote { border-left: 3px solid var(--border); margin-left: 0; padding-left: 16px; color: #666; }
.post-body img { max-width: 100%; }
.post-featured-img {
    width: 100%; max-height: 420px; object-fit: cover;
    border-radius: 6px; margin-bottom: 24px; display: block;
}

/* SHARE BAR */
.share-bar {
    display: flex; align-items: center; gap: 14px;
    margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border);
}
.share-label { font-size: 12px; color: #aaa; text-transform: uppercase; letter-spacing: .05em; }
.share-btn {
    display: flex; color: #bbb; transition: color 0.15s;
    text-decoration: none;
}
.share-btn svg { width: 20px; height: 20px; }
.share-btn:hover { color: var(--brand); }

@media (max-width: 600px) {
    .content { padding: 20px 15px; }
    .post-item { flex-direction: column; gap: 4px; }
}
