/* ================================ ItaFarmacia Styles ================================ */
/* Reddit-like design, responsive, Italian */

:root {
    --bg: #f7f7f8;
    --bg-card: #ffffff;
    --bg-hover: #f0f0f1;
    --text: #1a1a1b;
    --text-muted: #787c7e;
    --text-link: #0079d3;
    --text-link-hover: #005ba1;
    --border: #e5e5e6;
    --vote-active: #ff4500;
    --vote-inactive: #787c7e;
    --primary: #0079d3;
    --primary-hover: #005ba1;
    --primary-bg: #e8f4fd;
    --danger: #ff4500;
    --shadow: 0 1px 2px rgba(0,0,0,0.05), 0 4px 12px rgba(0,0,0,0.04);
    --shadow-hover: 0 2px 8px rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.06);
    --radius: 8px;
    --radius-sm: 4px;
    --transition: 150ms ease;
    --header-h: 56px;
    --max-w: 960px;
    --sidebar-w: 300px;
    --gap: 24px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #1a1a1b;
        --bg-card: #232324;
        --bg-hover: #2d2d2e;
        --text: #f7f7f8;
        --text-muted: #818384;
        --text-link: #3a9bdc;
        --text-link-hover: #6ab0e6;
        --border: #39393a;
        --vote-active: #ff4500;
        --vote-inactive: #818384;
        --primary: #3a9bdc;
        --primary-hover: #6ab0e6;
        --primary-bg: #1e3a4d;
        --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 4px 12px rgba(0,0,0,0.2);
        --shadow-hover: 0 2px 8px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.3);
    }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--text-link); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--text-link-hover); text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

button { font-family: inherit; font-size: inherit; cursor: pointer; border: none; background: none; }

input, textarea, select { font-family: inherit; font-size: inherit; }

.container { width: 100%; max-width: calc(var(--max-w) + var(--sidebar-w) + var(--gap) * 2); margin: 0 auto; padding: 0 var(--gap); }

/* ================================ Header ================================ */
.site-header {
    position: sticky; top: 0; z-index: 100;
    height: var(--header-h);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 100%; gap: 16px;
}

.brand { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); text-decoration: none; }
.brand-name { font-weight: 700; font-size: 1.25rem; letter-spacing: -0.5px; }
.brand-name strong { color: var(--primary); }

.main-nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 12px; border-radius: var(--radius);
    color: var(--text-muted); font-weight: 500; font-size: 0.9rem;
    transition: background var(--transition), color var(--transition);
}
.nav-link:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }
.nav-link.active { color: var(--primary); background: var(--primary-bg); }

.dd { position: relative; }
.dd-toggle { display: flex; align-items: center; gap: 4px; }
.caret { font-size: 0.6rem; transition: transform var(--transition); }
.dd:hover .caret { transform: rotate(180deg); }
.dd-menu {
    position: absolute; top: calc(100% + 8px); left: 0; min-width: 200px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-hover); padding: 8px; opacity: 0; visibility: hidden;
    transform: translateY(-8px); transition: all var(--transition);
}
.dd:hover .dd-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dd-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--text); }
.dd-item:hover { background: var(--bg-hover); text-decoration: none; }
.comm-ico { display: inline-flex; font-size: 1.1em; }
.comm-ico.tiny { font-size: 0.85em; }
.comm-ico.big { font-size: 2.5rem; }

.search-form { flex: 1; max-width: 400px; margin: 0 16px; }
.search-form input {
    width: 100%; padding: 8px 12px 8px 36px; border: 1px solid var(--border); border-radius: 20px;
    background: var(--bg); color: var(--text); outline: none; transition: border-color var(--transition), box-shadow var(--transition);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23787c7e' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='M21 21l-4.35-4.35'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: 10px center; background-size: 18px;
}
.search-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }
.search-form input::placeholder { color: var(--text-muted); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 16px; border-radius: var(--radius); font-weight: 600; font-size: 0.875rem;
    transition: background var(--transition), color var(--transition), box-shadow var(--transition);
    white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; text-decoration: none; }
.btn-ghost { color: var(--text); background: transparent; }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }
.btn-sm { padding: 6px 12px; font-size: 0.8125rem; }

.create-btn { display: none; }
.login-btn { display: none; }

.me-avatar {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--primary); color: #fff; font-weight: 700; font-size: 0.875rem;
    flex-shrink: 0;
}
.me-avatar.small { width: 28px; height: 28px; font-size: 0.8rem; }
.me-avatar.tiny { width: 20px; height: 20px; font-size: 0.7rem; }
.me-avatar.big { width: 64px; height: 64px; font-size: 1.5rem; }

/* ================================ Layout ================================ */
main.container { flex: 1; padding-top: 24px; padding-bottom: 48px; }

.layout { display: grid; grid-template-columns: 1fr; gap: var(--gap); }
@media (min-width: 1024px) {
    .layout { grid-template-columns: minmax(0, var(--max-w)) var(--sidebar-w); }
}

.page-narrow { max-width: 720px; margin: 0 auto; }

/* ================================ Feed ================================ */
.feed { min-width: 0; }
.feed-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.feed-head h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.5px; }
.feed-sub { color: var(--text-muted); font-size: 0.9rem; }
.feed-sub-title { font-size: 1.125rem; font-weight: 600; margin: 24px 0 12px; }

.empty { text-align: center; color: var(--text-muted); padding: 48px 24px; }

/* ================================ Post Card ================================ */
.post-card {
    display: flex; align-items: flex-start;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); margin-bottom: 16px; overflow: hidden;
    transition: box-shadow var(--transition), border-color var(--transition);
}
.post-card:hover { box-shadow: var(--shadow-hover); border-color: var(--border); }

.post-card-full { margin-bottom: 24px; }

.vote-col {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 16px 12px; min-width: 48px; flex-shrink: 0;
}
.vote-btn { display: flex; color: var(--vote-inactive); padding: 4px; border-radius: var(--radius-sm); transition: color var(--transition), background var(--transition); }
.vote-btn:hover { color: var(--vote-active); background: rgba(255,69,0,0.1); }
.vote-btn.up.voted { color: var(--vote-active); }
.vote-btn.down.voted { color: #7193ff; }
.vote-count { font-weight: 700; font-size: 1.1rem; color: var(--text); min-width: 1.5em; text-align: center; }

.post-main { padding: 16px; min-width: 0; }
.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; font-size: 0.8rem; color: var(--text-muted); }
.comm-link { display: inline-flex; align-items: center; gap: 4px; color: var(--primary); font-weight: 500; }
.comm-link:hover { color: var(--primary-hover); text-decoration: none; }
.meta-dot { color: var(--text-muted); }
.meta-time { white-space: nowrap; }
.user-link { display: inline-flex; align-items: center; gap: 4px; color: var(--text); font-weight: 500; }
.user-link:hover { color: var(--text-link); text-decoration: none; }
.me-avatar { border: 1px solid var(--border); }

.post-title { font-size: 1.125rem; font-weight: 600; line-height: 1.35; margin-bottom: 8px; }
.post-title a { color: var(--text); }
.post-title a:hover { color: var(--text-link); text-decoration: underline; }

.post-excerpt { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; margin-bottom: 12px; }

.post-body { color: var(--text); line-height: 1.7; font-size: 1rem; }
.post-body p { margin-bottom: 1em; }
.post-body strong { font-weight: 600; }
.post-body em { font-style: italic; }
.post-body code { background: var(--bg); padding: 0.15em 0.4em; border-radius: 3px; font-size: 0.9em; font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace; }
.post-body pre { background: var(--bg); padding: 16px; border-radius: var(--radius); overflow-x: auto; margin: 16px 0; }
.post-body pre code { background: none; padding: 0; font-size: 0.875rem; }
.post-body ul, .post-body ol { margin: 16px 0; padding-left: 24px; }
.post-body li { margin: 4px 0; }
.post-body blockquote { border-left: 3px solid var(--primary); padding-left: 16px; margin: 16px 0; color: var(--text-muted); font-style: italic; }

.post-actions { display: flex; align-items: center; gap: 16px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--text-muted); }
.action { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); padding: 4px 8px; border-radius: var(--radius-sm); transition: background var(--transition), color var(--transition); }
.action:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }
.act-ico { font-size: 1em; }

/* ================================ Sidebar ================================ */
.sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; }
@media (max-width: 1023px) { .sidebar { position: static; max-height: none; order: -1; border-bottom: 1px solid var(--border); padding-bottom: 16px; margin-bottom: 16px; } }

.side-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.side-title { font-size: 0.875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 12px; }

.comm-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 8px; border-radius: var(--radius-sm); color: var(--text); transition: background var(--transition); }
.comm-row:hover { background: var(--bg-hover); text-decoration: none; }
.comm-ico { flex-shrink: 0; }
.comm-row-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.comm-row-name { font-weight: 600; font-size: 0.9rem; }
.comm-row-desc { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.comm-row-count { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; margin-top: 2px; }

.side-text { font-size: 0.875rem; color: var(--text); line-height: 1.6; margin-bottom: 12px; }
.side-meta { font-size: 0.75rem; color: var(--text-muted); }

.rule-list { font-size: 0.8rem; color: var(--text-muted); line-height: 1.6; padding-left: 20px; }
.rule-list li { margin-bottom: 6px; }
.rule-list-wide { max-width: none; }

.top-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius-sm); color: var(--text); transition: background var(--transition); }
.top-row:hover { background: var(--bg-hover); text-decoration: none; }
.top-rank { font-weight: 700; font-size: 0.875rem; color: var(--text-muted); width: 24px; text-align: right; }
.top-name { font-weight: 500; font-size: 0.875rem; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-karma { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }

.side-card .btn { width: 100%; }

/* ================================ Community Page ================================ */
.comm-banner {
    display: flex; align-items: flex-start; gap: 16px;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.comm-banner-main { flex: 1; min-width: 0; }
.comm-banner h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; }
.comm-tagline { color: var(--text-muted); font-size: 1rem; margin-bottom: 8px; }
.comm-desc { color: var(--text); font-size: 0.9rem; line-height: 1.5; margin-bottom: 12px; }
.comm-stats { display: flex; gap: 24px; font-size: 0.85rem; color: var(--text-muted); }
.stat strong { color: var(--text); }

.join-btn { flex-shrink: 0; align-self: flex-start; }

.tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--border); padding-bottom: 4px; }
.tab { padding: 8px 16px; border-radius: var(--radius) var(--radius) 0 0; font-weight: 500; font-size: 0.9rem; color: var(--text-muted); background: transparent; border: none; cursor: pointer; transition: color var(--transition), background var(--transition); }
.tab:hover { color: var(--text); background: var(--bg-hover); }
.tab.active { color: var(--primary); background: var(--primary-bg); }

.sort-sections { display: flex; flex-direction: column; }
.sort-section { display: none; }
.sort-section:not(.hidden) { display: block; }

/* ================================ Comments ================================ */
.comments { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.comments-title { font-size: 1.125rem; font-weight: 600; margin-bottom: 16px; }

.comment { margin-bottom: 16px; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.comment.nested { margin-left: 48px; border-left: 2px solid var(--border); padding-left: 16px; }
.comment-main { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; box-shadow: var(--shadow); }
.comment-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; font-size: 0.8rem; color: var(--text-muted); }
.comment-head .user-link { font-weight: 600; color: var(--text); font-size: 0.875rem; }
.user-handle { color: var(--text-muted); font-weight: 400; }
.comment-time { white-space: nowrap; }
.comment-body { color: var(--text); line-height: 1.6; font-size: 0.95rem; }
.comment-body p { margin-bottom: 0.75em; }
.comment-body p:last-child { margin-bottom: 0; }
.comment-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 0.8rem; }
.vote-inline { display: flex; align-items: center; gap: 4px; }
.vote-inline .vote-btn { padding: 2px; }
.vote-inline .vote-count { font-size: 0.85rem; font-weight: 600; min-width: 1.2em; }
.reply-btn { color: var(--text-muted); font-weight: 500; padding: 4px 8px; border-radius: var(--radius-sm); transition: background var(--transition), color var(--transition); }
.reply-btn:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }

.comment-children { margin-top: 12px; }

.comment-form-wrap { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.cf-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 0.85rem; color: var(--text-muted); }
.cf-as strong { color: var(--text); }
.comment-form textarea {
    width: 100%; min-height: 80px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--bg); color: var(--text); resize: vertical; outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
    font-family: inherit; line-height: 1.5;
}
.comment-form textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }
.cf-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.demo-tag { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* ================================ User Profile ================================ */
.user-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; padding: 20px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.user-head-main { flex: 1; min-width: 0; }
.user-head h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 4px; }
.user-handle { color: var(--text-muted); font-weight: 400; font-size: 1rem; }
.user-bio { color: var(--text); margin: 12px 0; line-height: 1.5; }

/* ================================ About Page ================================ */
.about-comm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin: 24px 0; }
.about-comm { display: flex; align-items: flex-start; gap: 12px; padding: 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); transition: box-shadow var(--transition), border-color var(--transition); }
.about-comm:hover { box-shadow: var(--shadow-hover); border-color: var(--primary); text-decoration: none; }
.about-comm .comm-ico { font-size: 2rem; flex-shrink: 0; }
.about-comm-name { font-weight: 600; font-size: 1rem; display: block; margin-bottom: 4px; }
.about-comm-desc { font-size: 0.85rem; color: var(--text-muted); }

.demo-note { margin-top: 32px; padding: 16px; background: var(--primary-bg); border: 1px solid var(--primary); border-radius: var(--radius); font-size: 0.85rem; color: var(--primary); }

/* ================================ Search ================================ */
.search-head { margin-bottom: 24px; }
.search-head h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.comment-hits { display: flex; flex-direction: column; gap: 8px; }
.comment-hit { display: block; padding: 12px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); transition: box-shadow var(--transition), border-color var(--transition); }
.comment-hit:hover { box-shadow: var(--shadow-hover); border-color: var(--primary); text-decoration: none; }
.ch-user { font-weight: 600; color: var(--primary); margin-right: 8px; }

/* ================================ 404 ================================ */
.notfound { text-align: center; padding: 80px 24px; }
.nf-code { font-size: 8rem; font-weight: 800; color: var(--border); line-height: 1; letter-spacing: -0.05em; margin-bottom: 16px; }
.notfound h1 { font-size: 2rem; font-weight: 700; margin-bottom: 12px; }
.notfound p { color: var(--text-muted); margin-bottom: 24px; font-size: 1.1rem; }

/* ================================ Footer ================================ */
.site-footer { margin-top: auto; padding: 32px 0; border-top: 1px solid var(--border); background: var(--bg-card); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-muted); }
.footer-nav { display: flex; gap: 24px; font-size: 0.85rem; }
.footer-nav a { color: var(--text-muted); }
.footer-nav a:hover { color: var(--text); }
.footer-nav .fictitious { pointer-events: none; opacity: 0.5; }

/* ================================ Modals ================================ */
.modal-backdrop {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(2px);
    display: flex; align-items: center; justify-content: center; padding: 24px;
    opacity: 0; visibility: hidden; transition: opacity var(--transition), visibility var(--transition);
}
.modal-backdrop:not([hidden]) { opacity: 1; visibility: visible; }
.modal {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-hover); padding: 24px; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
    transform: scale(0.95); transition: transform var(--transition);
}
.modal-backdrop:not([hidden]) .modal { transform: scale(1); }
.modal-wide { max-width: 600px; }
.modal h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 20px; }
.login-form, .register-form, .post-form { display: flex; flex-direction: column; gap: 16px; }
.login-form label, .register-form label, .post-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.875rem; font-weight: 500; color: var(--text); }
.login-form input, .register-form input, .post-form input, .post-form select, .post-form textarea {
    padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--bg); color: var(--text); outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.login-form input:focus, .register-form input:focus, .post-form input:focus, .post-form select:focus, .post-form textarea:focus {
    border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg);
}
.modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 8px; }
.modal-note { text-align: center; font-size: 0.85rem; color: var(--text-muted); margin-top: 16px; }
.modal-note a { font-weight: 500; }
.switch-modal { color: var(--primary); }
.demo-tag { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.toasts { position: fixed; bottom: 24px; right: 24px; z-index: 1100; display: flex; flex-direction: column; gap: 8px; }

/* ================================ Breadcrumbs ================================ */
.breadcrumbs { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 16px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--text-link); }
.breadcrumbs span[itemprop="itemListElement"]:not(:last-child)::after { content: '/'; color: var(--text-muted); }

/* ================================ Responsive ================================ */
@media (max-width: 768px) {
    :root { --gap: 16px; --header-h: 52px; }
    .header-inner { gap: 8px; }
    .brand-name { font-size: 1.1rem; }
    .nav-link { padding: 6px 8px; font-size: 0.85rem; }
    .search-form { max-width: none; margin: 0; }
    .create-btn, .login-btn { display: none; }
    .me-avatar { width: 28px; height: 28px; font-size: 0.8rem; }
    .post-card { border-radius: 0; border-left: none; border-right: none; margin-bottom: 0; }
    .post-main { padding: 12px; }
    .vote-col { padding: 12px 8px; min-width: 40px; }
    .comment.nested { margin-left: 24px; padding-left: 12px; }
    .user-head { flex-direction: column; align-items: center; text-align: center; }
    .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .comm-banner { flex-direction: column; align-items: stretch; }
    .join-btn { width: 100%; }
    .tabs { overflow-x: auto; white-space: nowrap; padding-bottom: 8px; }
    .tab { flex-shrink: 0; }
    .post-meta { font-size: 0.75rem; gap: 6px; }
    .post-title { font-size: 1rem; }
}

/* ================================ Avatar SVG ================================ */
.avatar-svg { border-radius: 50%; overflow: hidden; }

/* ================================ Scrollbar ================================ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }