:root {
    --bg: radial-gradient(circle at 20% 20%, rgba(99,102,241,0.16), transparent 30%),
           radial-gradient(circle at 80% 0%, rgba(236,72,153,0.16), transparent 28%),
           #0b0f16;
    --surface: #0f1623;
    --panel: #121b2b;
    --card: #151f30;
    --text: #e8edf5;
    --muted: #9aa7b9;
    --accent: #7c3aed;
    --accent-2: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --border: rgba(255,255,255,0.08);
    --shadow: 0 12px 30px rgba(0,0,0,0.45);
    --radius: 16px;
    --blur: blur(14px);
    --card-glow: 0 12px 40px rgba(124,58,237,0.18);
    --icon-size: 18px;
    --hover: rgba(255,255,255,0.06);
    --text-primary: var(--text);
    --nav-bg: rgba(12,18,28,0.8);
    --input-bg: rgba(255,255,255,0.02);
}

[data-theme="light"] {
    --bg: radial-gradient(circle at 18% 12%, rgba(99,102,241,0.12), transparent 26%),
           radial-gradient(circle at 88% 0%, rgba(236,72,153,0.1), transparent 24%),
           #f3f6fb;
    --surface: #ffffff;
    --panel: #f8fafc;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #526070;
    --accent: #5b21b6;
    --accent-2: #15803d;
    --danger: #b91c1c;
    --warning: #b45309;
    --border: rgba(15,23,42,0.12);
    --shadow: 0 12px 30px rgba(15,23,42,0.08);
    --card-glow: 0 18px 40px rgba(91,33,182,0.16);
    --hover: rgba(15,23,42,0.06);
    --nav-bg: rgba(255,255,255,0.9);
    --input-bg: #ffffff;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #a78bfa; }

.container { max-width: 1200px; margin: 0 auto; padding: 1.75rem 1.25rem 3rem; }
.hidden { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* NAVBAR */
.navbar {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .85rem 1.25rem;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: var(--blur);
    z-index: 20;
}
.navbar .brand {
    font-weight: 800;
    letter-spacing: 0.4px;
    color: #fff;
    background: linear-gradient(120deg, #7c3aed, #22d3ee, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    font-size: 1rem;
}
.nav-group { display: flex; align-items: center; gap: 0.75rem; }
.nav-links { display: flex; align-items: center; gap: 0.5rem; }
.nav-link {
    color: var(--text);
    padding: .5rem .75rem;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: all .2s ease;
    font-weight: 600;
}
.nav-link:hover { border-color: var(--border); background: rgba(255,255,255,0.04); }

.nav-actions { display: flex; align-items: center; gap: .5rem; }
.icon-btn {
    width: 42px; height: 42px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.01));
    box-shadow: var(--shadow);
    color: var(--text);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: transform .15s ease, border-color .2s ease, box-shadow .2s ease;
}
.icon-btn:hover { transform: translateY(-2px); border-color: rgba(124,58,237,0.4); }
.icon-btn:active { transform: translateY(0); }

.ghost {
    padding: .55rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.02);
    color: var(--text);
    font-weight: 700;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform .15s ease, border-color .2s ease, box-shadow .2s ease;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}
.ghost:hover { transform: translateY(-2px); border-color: rgba(124,58,237,0.4); }
.ghost:active { transform: translateY(0); }

.notification-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.notification-icon .badge {
    position: absolute;
    top: -6px; right: -8px;
    background: var(--danger);
    color: #fff;
    border-radius: 999px;
    padding: 2px 7px;
    font-size: 0.7rem;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 6px 14px rgba(239,68,68,0.35);
}

.glyph {
    width: 18px;
    height: 18px;
    display: inline-block;
    background: currentColor;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}
.ico-bell { mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9a6 6 0 1 1 12 0c0 3 1 5 2 6H4c1-1 2-3 2-6Zm6 12a2.5 2.5 0 0 0 2.45-2h-4.9A2.5 2.5 0 0 0 12 21Z' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9a6 6 0 1 1 12 0c0 3 1 5 2 6H4c1-1 2-3 2-6Zm6 12a2.5 2.5 0 0 0 2.45-2h-4.9A2.5 2.5 0 0 0 12 21Z' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ico-mail { mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6h16v12H4V6Zm0 0 8 6 8-6' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 6h16v12H4V6Zm0 0 8 6 8-6' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ico-theme { mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 3v2m0 14v2m9-9h-2M5 12H3m15.364 6.364-1.414-1.414M7.05 7.05 5.636 5.636M18.364 5.636 16.95 7.05M7.05 16.95 5.636 18.364M16 12a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 3v2m0 14v2m9-9h-2M5 12H3m15.364 6.364-1.414-1.414M7.05 7.05 5.636 5.636M18.364 5.636 16.95 7.05M7.05 16.95 5.636 18.364M16 12a4 4 0 1 1-8 0 4 4 0 0 1 8 0Z' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ico-chat { mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 17v4l4-4h6a3 3 0 0 0 3-3V6a3 3 0 0 0-3-3H7a3 3 0 0 0-3 3v8a3 3 0 0 0 3 3Z' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 17v4l4-4h6a3 3 0 0 0 3-3V6a3 3 0 0 0-3-3H7a3 3 0 0 0-3 3v8a3 3 0 0 0 3 3Z' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

.profile-mini {
    display: flex;
    align-items: center;
    gap: .6rem;
    position: relative;
    padding: .35rem .55rem;
    border-radius: 14px;
    border: 1px solid transparent;
    transition: all .2s ease;
}
.profile-mini:hover { border-color: var(--border); background: rgba(255,255,255,0.04); }
.profile-mini .menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 6px;
    min-width: 200px;
    background: var(--card);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: .35rem;
    z-index: 25;
}
.profile-mini .menu::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}
.profile-mini:focus-within .menu,
.profile-mini:hover .menu,
.profile-mini .menu:hover { display: block; }
.profile-mini .menu a {
    display: block;
    padding: .6rem .8rem;
    border-radius: 12px;
    color: var(--text);
}
.profile-mini .menu a:hover { background: rgba(255,255,255,0.05); }

.nav-toggle { display: none; }

/* CARDS & LAYOUT */
.card {
    background: linear-gradient(160deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(124,58,237,0.4); box-shadow: var(--card-glow); }
.card .thumb { background-size: cover; background-position: center; border-radius: 12px; height: 200px; position: relative; overflow: hidden; }
.card .thumb::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,0.25));
}
.card .card-body {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: .55rem;
    min-height: 150px;
}
.card .title {
    font-weight: 800;
    margin: .65rem 0 0;
    letter-spacing: 0.2px;
    word-break: break-word;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.28;
}
.card .meta { color: var(--muted); font-size: .9rem; margin-top: auto; line-height: 1.3; padding-top: .4rem; border-top: 1px solid var(--border); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 320px)); gap: 1rem; justify-content: center; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.feed-grid { max-width: 1200px; margin: 0 auto; grid-template-columns: repeat(auto-fit, minmax(260px, 320px)); }
.article-card { display: flex; flex-direction: column; height: 100%; aspect-ratio: 1 / 1; overflow: hidden; }
.article-card h3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tabs { display: inline-flex; gap: .75rem; padding: .4rem; border-radius: 999px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); }
.tabs a { color: var(--muted); text-decoration: none; padding: .45rem .9rem; border-radius: 12px; border: 1px solid transparent; font-weight: 600; }
.tabs a.active { color: var(--text); border-color: var(--accent); box-shadow: 0 6px 16px rgba(124,58,237,0.28); }

/* FORMS */
.form-card {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 1.75rem;
    border-radius: 18px;
    max-width: 560px;
    margin: 0 auto;
    box-shadow: var(--shadow);
}
label { display: block; margin: .85rem 0 .35rem; color: var(--text); font-weight: 600; }
input, textarea, select {
    width: 100%;
    padding: .75rem .85rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--input-bg);
    color: var(--text);
    font-size: 1rem;
    transition: border-color .2s ease, box-shadow .2s ease;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(124,58,237,0.22);
}
textarea { min-height: 120px; resize: vertical; }

.btn {
    background: linear-gradient(120deg, var(--accent), #22d3ee);
    color: #fff;
    border: none;
    padding: .7rem 1.2rem;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 12px 30px rgba(124,58,237,0.35);
    transition: transform .15s ease, box-shadow .2s ease, opacity .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn.secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: none;
}
.btn.outline { background: transparent; border: 1px solid var(--accent); color: var(--accent); box-shadow: none; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-sm { padding: .45rem .8rem; font-size: .9rem; border-radius: 12px; box-shadow: none; }

.pill { display: inline-flex; align-items: center; gap: .4rem; background: rgba(255,255,255,0.06); padding: .35rem .75rem; border-radius: 999px; margin: .25rem 0; }
.inline { display: inline-flex; gap: .5rem; align-items: center; margin-right: .5rem; }

.flash-area { display: grid; gap: .5rem; margin: 1rem 0; }
.flash { padding: .9rem 1rem; border-radius: 14px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); }
.flash.success { border-color: #16a34a; }
.flash.danger { border-color: var(--danger); }
.flash.warning { border-color: var(--warning); }

.profile-header { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.avatar {
    width: 76px; height: 76px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #db2777);
    color: #fff;
    display: grid; place-items: center;
    font-weight: 800;
    background-size: cover; background-position: center;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.08);
}
.avatar.has-photo { color: transparent; text-indent: 120%; white-space: nowrap; }
.avatar.small { width: 42px; height: 42px; font-size: .9rem; }
.avatar.large { width: 110px; height: 110px; }

.avatar-preview-wrap { display: grid; grid-template-columns: 220px 1fr; gap: 1rem; align-items: center; margin: 1rem 0; }
#avatarPreviewWrapper.hidden { display: none; }
#avatarPreview { width: 220px; height: 220px; border-radius: 18px; border: 1px dashed var(--border); background: var(--panel); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04); }
.avatar-controls label { color: var(--muted); font-size: .9rem; }

.art-detail { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; align-items: start; }
.art-detail h1 { word-break: break-word; overflow-wrap: anywhere; }
.art-detail img { width: 100%; border-radius: 18px; box-shadow: var(--card-glow); }
.art-meta { background: var(--card); padding: 1rem; border-radius: 18px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.reactions button { margin-right: .5rem; border: 1px solid var(--border); background: rgba(255,255,255,0.02); color: var(--text); padding: .45rem .65rem; border-radius: 12px; cursor: pointer; transition: all .15s ease; }
.reactions button:hover { border-color: var(--accent); transform: translateY(-1px); }
.reactions .active { border-color: var(--accent); box-shadow: 0 6px 16px rgba(124,58,237,0.25); }

.comments { margin-top: 2rem; }
.comment { display: flex; gap: .75rem; margin: 1rem 0; }
.comment.child { margin-left: 2rem; border-left: 1px dashed var(--border); padding-left: .75rem; }
.comment .meta { color: var(--muted); font-size: .9rem; }
.comment .inline { display: inline-flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.comment .inline input { width: 200px; }
.comment .inline .btn { box-shadow: none; }

/* CHAT */
.chat-box { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 1rem; max-height: 440px; overflow-y: auto; display: grid; gap: .85rem; box-shadow: var(--shadow); }
.chat-msg { display: flex; gap: .75rem; align-items: flex-start; padding: .35rem; border-radius: 12px; }
.chat-msg[data-role="admin"] { border-left: 3px solid #ef4444; }
.chat-msg[data-role="moderator"] { border-left: 3px solid #22c55e; }
.chat-msg[data-role="watcher"] { border-left: 3px solid #3b82f6; }
.chat-msg[data-role="vip"] p { color: #fbbf24; font-weight: 600; }
.chat-form { margin-top: 1rem; display: flex; gap: .6rem; }
.chat-form input { flex: 1; }
.chat-msg .role { padding: .2rem .55rem; border-radius: 10px; font-size: .8rem; font-weight: 700; }
.role-admin { background: #7f1d1d; color: #fff; }
.role-moderator { background: #14532d; color: #fff; }
.role-watcher { background: #1d4ed8; color: #fff; }
.role-vip { background: linear-gradient(120deg, #fcd34d, #f59e0b); color: #0f172a; }
.chat-popup-body .avatar.has-photo, .chat-msg .avatar.has-photo { color: transparent; }

.chat-toggle { position: fixed; left: 18px; bottom: 18px; width: 58px; height: 58px; border-radius: 50%; background: linear-gradient(140deg, #22d3ee, #7c3aed); display: grid; place-items: center; cursor: pointer; color: #fff; box-shadow: 0 12px 32px rgba(0,0,0,0.35); z-index: 20; transition: transform .2s ease, box-shadow .2s ease; }
.chat-toggle:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(0,0,0,0.4); }
.chat-popup { position: fixed; left: 18px; bottom: 88px; width: 380px; max-width: 92vw; max-height: 74vh; display: none; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); z-index: 20; resize: both; overflow: hidden; }
.chat-popup.open { display: flex; }
.chat-popup-header { display: flex; align-items: center; justify-content: space-between; padding: .75rem .9rem; border-bottom: 1px solid var(--border); cursor: move; background: rgba(255,255,255,0.02); }
.chat-popup-header .close { background: transparent; border: none; color: var(--text); font-size: 1.2rem; cursor: pointer; }
.chat-popup-body { padding: .75rem; overflow-y: auto; flex: 1; display: grid; gap: .65rem; }
.chat-popup-body .chat-msg { background: rgba(255,255,255,0.03); border-radius: 12px; padding: .4rem; }
.chat-popup-form { display: flex; gap: .5rem; padding: .65rem; border-top: 1px solid var(--border); background: rgba(255,255,255,0.02); }
.chat-popup-form input { flex: 1; }

/* TABLES */
.table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { padding: .75rem; border-bottom: 1px solid var(--border); text-align: left; }
.table tr:last-child td { border-bottom: none; }

.footer { text-align: center; padding: 2rem 1rem 3rem; border-top: 1px solid var(--border); color: var(--muted); }
.footer a { color: var(--muted); }
.center { text-align: center; padding: 4rem 0; }
.muted { color: var(--muted); }

.card-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card-grid.two-cols { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.list { list-style: none; padding: 0; }
.list li { padding: .6rem 0; border-bottom: 1px solid var(--border); }
.stacked form { margin-bottom: .35rem; }

/* RESPONSIVE */
@media (max-width: 1040px) {
    .container { padding: 1.5rem 1.1rem 3rem; }
    .navbar { flex-wrap: wrap; gap: .5rem; }
    .nav-links { display: none; width: 100%; flex-wrap: wrap; }
    .nav-links.open { display: flex; }
    .nav-toggle { display: inline-flex; }
    .nav-group { width: 100%; justify-content: space-between; }
    .art-detail { grid-template-columns: 1fr; }
    .avatar-preview-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .profile-header { flex-direction: column; align-items: flex-start; }
    .chat-popup { width: 94vw; left: 3vw; }
    .grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
    .feed-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}
/* Articles and upload dropdown */
.nav-links .dropdown-trigger { position: relative; }
.dropdown-menu { position: absolute; top: 100%; left: 0; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.25); padding: 8px; display: none; z-index: 12; }
.dropdown-menu a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--text-primary); }
.dropdown-menu a:hover { background: var(--hover); }
.dropdown-trigger:hover .dropdown-menu, .dropdown-trigger:focus-within .dropdown-menu { display: block; }
.dropdown-trigger button.ghost {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    color: var(--text);
    height: 40px;
    padding: .5rem .9rem;
    display: inline-flex;
    align-items: center;
}

.article-editor { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 14px; min-height: 320px; }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.editor-toolbar button { background: var(--hover); border: 1px solid var(--border); color: var(--text-primary); border-radius: 8px; padding: 6px 10px; }
.article-view { display: grid; gap: 16px; }
.article-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.article-cover { width: min(360px, 100%); border-radius: 16px; overflow: hidden; border: 1px solid var(--border); background: var(--panel); }
.article-cover img { width: 100%; height: auto; display: block; object-fit: cover; }
.article-content { line-height: 1.7; font-size: 1.05rem; }
.article-content img { max-width: 100%; border-radius: 14px; }
.article-card .cover { display: block; aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--panel); box-shadow: inset 0 1px 0 rgba(255,255,255,0.06); }
.article-card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-card .cover + .card-body { margin-top: .75rem; }
.article-card .card-body { display: flex; flex-direction: column; gap: .75rem; flex: 1; }
.article-card .card-body .btn { align-self: flex-start; }
.attachment img { max-width: 220px; border-radius: 12px; }

.reactions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.reactions form { margin: 0; display: inline-flex; }

.my-works .card { display: flex; flex-direction: column; gap: .5rem; }
.my-works .card img { width: 100%; border-radius: 12px; object-fit: cover; height: 180px; }
.my-works .card h3 { margin: .25rem 0; word-break: break-word; }
.page-content p { margin: 0 0 1rem; }
.page-content p:last-child { margin-bottom: 0; }

.articles-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 280px)); justify-content: center; }
