*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --bg: #ffffff;
    --text: #1a1a1a;
    --text-secondary: #555555;
    --text-muted: #999999;
    --border: #eaeaea;
    --accent: #ff3b80;
    --tag-bg: #f5f5f5;
    --max-width: 680px;
    --side-padding: 16px;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0d0d0d;
        --text: #e8e8e8;
        --text-secondary: #aaaaaa;
        --text-muted: #666666;
        --border: #1f1f1f;
        --tag-bg: #1a1a1a;
    }
}
html { overflow-x: hidden; }
body {
    -webkit-tap-highlight-color: transparent;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100vh;
}
header {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 32px var(--side-padding) 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
header a { color: var(--text-muted); text-decoration: none; font-size: 15px; }
main { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--side-padding); }
.post-card { margin-bottom: 56px; cursor: pointer; }
.post-image { width: 100%; max-width: 100%; height: auto; object-fit: contain; background: none; }
.post-header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 12px; }
.post-header h2 { font-size: 26px; font-weight: 700; line-height: 1.3; margin: 0; flex: 1; }
.post-header time { font-size: 15px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
@media (max-width: 680px) {
    .post-header { flex-direction: column; gap: 2px; }
    .post-header h2 { font-size: 24px; }
}
.post-title-link { color: var(--text); text-decoration: none; }
@media (prefers-color-scheme: dark) {
    .post-title-link { text-shadow: 0 0 7px rgba(255,59,128,0.4), 0 0 18px rgba(255,59,128,0.15); }
}
.post-preview { color: var(--text-secondary); font-size: 18px; line-height: 1.6; margin-top: 6px; }
.post-content-wrapper { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.4s ease; overflow: hidden; }
.post-content-wrapper.expanded { grid-template-rows: 1fr; }
.post-content-inner { min-height: 0; overflow: hidden; }
.post-full { color: var(--text-secondary); font-size: 18px; line-height: 1.7; font-weight: 400; border-top: 1px solid var(--border); padding-top: 12px; margin-top: 8px; }
.post-full p { margin-bottom: 16px; }
.post-full p:last-child { margin-bottom: 0; }
.post-full img { width: 100%; max-width: 100%; border-radius: 2px; }
@media (max-width: 680px) {
    .post-full img {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
    }
}
.post-content-wrapper.expanded ~ .post-preview { display: none; }
.post-card:has(.post-content-wrapper.expanded) .post-preview { display: none; }
.tags { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags a { font-size: 14px; color: var(--text-muted); text-decoration: none; background: var(--tag-bg); padding: 3px 10px; border-radius: 4px; }
.post-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.post-action { display: inline-flex !important; align-items: center !important; gap: 6px; height: 36px; font-size: 15px; color: var(--text-muted); text-decoration: none; cursor: pointer; background: none; border: none; padding: 0 4px !important; margin: 0; font-family: inherit; transition: color 0.15s; white-space: nowrap; vertical-align: middle; line-height: 1; }
.post-action:hover { color: var(--text-secondary); }
.post-action svg { width: 18px; height: 18px; flex-shrink: 0; }
.post-action-count { font-size: 15px; line-height: 18px; }
@media (max-width: 680px) {
    .post-action svg { width: 16px; height: 16px; }
    .post-action { padding: 0 2px !important; height: 32px; }
    .post-action-count { font-size: 14px; line-height: 16px; }
}
article { margin-bottom: 56px; }
article img { width: 100%; max-width: 100%; height: auto; object-fit: contain; background: none; }
article .post-header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 12px; }
article .post-header h1 { font-size: 28px; font-weight: 700; line-height: 1.3; margin: 0; flex: 1; }
article .post-header time { font-size: 15px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
@media (max-width: 680px) {
    article .post-header { flex-direction: column; gap: 2px; }
    article .post-header h1 { font-size: 26px; }
}
footer { max-width: var(--max-width); margin: 0 auto; padding: 48px var(--side-padding) 32px; font-size: 15px; color: var(--text-muted); }
@media (max-width: 680px) {
    footer { padding: 32px var(--side-padding) 24px; }
}
form { margin-top: 24px; }
textarea, input[type="text"] { width: 100%; padding: 8px 12px; font-family: inherit; font-size: 15px; border: 1px solid var(--border); border-radius: 4px; background: var(--bg); color: var(--text); }
button, .btn { padding: 8px 16px; font-family: inherit; font-size: 15px; font-weight: 700; border: none; border-radius: 4px; cursor: pointer; background: #1a1a1a; color: #fff; margin-top: 8px; }
.comment { padding: 16px 0; border-bottom: 1px solid var(--border); }
.comment.reply { margin-left: 20px; border-left: 1px solid var(--border); padding-left: 16px; }
body {
    -webkit-tap-highlight-color: transparent; font-weight: 400; }
.post-header h1, .post-header h2, h1, h2 { font-weight: 700; }
.post-preview, .post-full { font-weight: 400; }
.subscribe-btn {
    font-family: "Raleway", sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid rgba(255, 59, 128, 0.25);
    border-radius: 6px;
    padding: 6px 14px;
    cursor: pointer;
    transition: none;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}
.subscribe-btn:hover {
    border-color: rgba(255, 59, 128, 0.5);
    color: var(--text-secondary);
}
.subscribe-btn.subscribed {
    border-color: rgba(255, 59, 128, 0.5);
    color: var(--accent);
}
@media (prefers-color-scheme: dark) {
    .subscribe-btn {
        border-color: rgba(255, 59, 128, 0.4);
        color: var(--text-muted);
    }
    .subscribe-btn:hover {
        border-color: rgba(255, 59, 128, 0.7);
        color: var(--text-secondary);
    }
}
.post-card:has(.post-content-wrapper.expanded) .subscribe-inline {
    display: block !important;
}

.post-image {
    animation: skeleton 1.5s ease-in-out infinite;
    background: var(--border);
}
@keyframes skeleton {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}
.post-image[src] {
    animation: none;
    background: none;
}

footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
