/* ============================================================
   RATE MY SOUND — theme
   Dark audiophile community theme with red accents.
   ============================================================ */

:root {
    --bg: #000000;
    --bg-soft: #0b0b0d;
    --card: #101014;
    --card-2: #17171c;
    --border: #26262c;
    --border-soft: #1b1b20;
    --text: #f5f5f4;
    --muted: #a1a1aa;
    --muted-2: #6e6e78;
    --gold: #e8262f;
    --gold-soft: #ff5a5a;
    --gold-dim: rgba(232, 38, 47, .12);
    --radius: 12px;
    --nav-h: 62px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.wrap { max-width: 1420px; margin: 0 auto; padding: 0 22px; }

/* ---------- Top navigation ---------- */
.site-nav {
    position: sticky; top: 0; z-index: 50;
    height: var(--nav-h);
    background: rgba(10, 11, 16, .96);
    border-bottom: 1px solid var(--border-soft);
    backdrop-filter: blur(8px);
}
.site-nav .wrap {
    height: var(--nav-h);
    display: flex; align-items: center; gap: 26px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand svg { width: 34px; height: 34px; }
.brand-name { font-weight: 800; letter-spacing: .06em; font-size: 15px; line-height: 1.1; }
.brand-tag { font-size: 8px; letter-spacing: .14em; color: var(--muted-2); font-weight: 600; }

.main-links { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.main-links a {
    padding: 8px 12px; font-size: 13.5px; font-weight: 500; color: var(--muted);
    border-radius: 8px; position: relative; white-space: nowrap;
}
.main-links a:hover { color: var(--text); background: var(--card); }
.main-links a.active { color: var(--text); }
.main-links a.active::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px;
    height: 2px; border-radius: 2px; background: var(--gold);
}
.nav-spacer { flex: 1; }
.nav-icons { display: flex; align-items: center; gap: 6px; }
.icon-btn {
    width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px; color: var(--muted); background: transparent; border: 0; cursor: pointer;
}
.icon-btn:hover { background: var(--card); color: var(--text); }
.icon-btn svg { width: 19px; height: 19px; }
.nav-avatar {
    width: 36px; height: 36px; border-radius: 50%; margin-left: 8px;
    background: linear-gradient(135deg, #3a0f14, #e8262f);
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; color: #111; border: 2px solid var(--border);
    overflow: hidden; flex-shrink: 0;
}
.avatar-img { overflow: hidden; padding: 0 !important; }
.avatar-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }

/* ---------- Page layout ---------- */
.page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 24px;
    padding-top: 22px;
    padding-bottom: 40px;
    align-items: start;
}

/* ---------- Hero ---------- */
.hero {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    background: var(--card);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 30px;
}
.hero-copy { padding: 44px 40px; display: flex; flex-direction: column; justify-content: center; }
.hero-kicker {
    display: inline-flex; align-items: center; align-self: flex-start; gap: 8px;
    font-size: 10px; letter-spacing: .24em; font-weight: 700; color: var(--gold-soft);
    border: 1px solid rgba(232,38,47,.4); border-radius: 999px;
    padding: 8px 18px; margin-bottom: 24px; background: rgba(232,38,47,.06);
    white-space: nowrap;
}
.hero-kicker svg { width: 12px; height: 12px; }
.hero h1 {
    font-family: "Playfair Display", Georgia, "Times New Roman", serif;
    font-size: 60px; line-height: 1.04; margin: 0 0 20px; font-weight: 700; letter-spacing: 0;
}
.hero h1 .gold { color: var(--gold-soft); font-style: italic; }
.hero p.sub { color: var(--muted); font-size: 16px; max-width: 430px; margin: 0 0 28px; line-height: 1.65; }
.hero-cta { display: flex; gap: 12px; margin-bottom: 32px; flex-wrap: wrap; }
.hero-cta .btn { border-radius: 999px; padding: 15px 32px; font-size: 15px; }
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--gold); color: #141414;
    padding: 12px 24px; border-radius: 10px; font-weight: 700; font-size: 14px;
    border: 1px solid var(--gold); cursor: pointer;
}
.btn:hover { background: var(--gold-soft); }
.btn-outline {
    background: transparent; color: var(--text); border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold-soft); background: transparent; }
.btn-block { width: 100%; justify-content: center; }
.hero-stats { display: flex; gap: 34px; }
.stat { display: flex; align-items: center; gap: 10px; }
.stat svg { width: 22px; height: 22px; color: var(--muted); }
.stat b { display: block; font-size: 16px; }
.stat span { display: block; font-size: 11.5px; color: var(--muted-2); }
.hero-img { min-height: 340px; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Setup of the Week ---------- */
.week-feature {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    background: var(--card); border: 1px solid rgba(232,38,47,.3);
    border-radius: 16px; overflow: hidden;
}
.week-img { min-height: 280px; }
.week-img img { width: 100%; height: 100%; object-fit: cover; }
.week-copy { padding: 34px 32px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 12px; }
.week-label { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .22em; font-weight: 700; color: var(--gold-soft); }
.week-copy h2 { font-size: 26px; margin: 0; }
.week-copy .muted { color: var(--muted); font-size: 14px; margin: 0; }
.week-metrics { display: flex; gap: 20px; font-size: 13.5px; color: var(--muted); }
.week-owner { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }

/* ---------- Sections ---------- */
.section { margin-bottom: 34px; }
.section-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px;
}
.section-title { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 700; margin: 0; }
.section-title svg { width: 19px; height: 19px; color: var(--gold); }
.view-all { font-size: 13px; color: var(--muted); font-weight: 500; }
.view-all:hover { color: var(--gold-soft); }

/* ---------- Cards ---------- */
.card {
    background: var(--card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-2px); border-color: var(--border); }
.card-img { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--card-2); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.badge-featured {
    position: absolute; top: 10px; left: 10px;
    background: var(--gold); color: #141414;
    font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 6px;
}
.card-body { padding: 14px 15px; }
.card-title { font-size: 14.5px; font-weight: 700; margin: 0 0 8px; }
.card-author { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.card-meta {
    display: flex; align-items: center; gap: 14px; margin-top: 10px;
    font-size: 12px; color: var(--muted-2);
}
.card-meta .m { display: inline-flex; align-items: center; gap: 5px; }
.card-meta svg { width: 14px; height: 14px; }
.rating { margin-left: auto; color: var(--gold-soft); font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.rating svg { width: 13px; height: 13px; }

/* grids */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }

/* ---------- Post cards ---------- */
.post-card .card-body { padding: 14px 16px 12px; }
.post-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.post-head .who b { display: block; font-size: 13.5px; }
.post-head .who span { font-size: 11.5px; color: var(--muted-2); }
.post-text { font-size: 13px; color: var(--muted); margin: 10px 0 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-foot {
    display: flex; align-items: center; gap: 16px; padding: 10px 16px 13px;
    font-size: 12.5px; color: var(--muted-2);
}
.post-foot .m { display: inline-flex; align-items: center; gap: 6px; }
.post-foot svg { width: 15px; height: 15px; }
.post-foot .liked { color: #e5486f; }
.post-tags { margin-left: auto; display: flex; gap: 6px; }
.post-tags span { background: var(--card-2); border: 1px solid var(--border-soft); padding: 2px 9px; border-radius: 20px; font-size: 11px; color: var(--muted); }

/* filter tabs */
.tabs { display: flex; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs button {
    background: none; border: 0; color: var(--muted); font-size: 13.5px; font-weight: 600;
    padding: 8px 14px; border-radius: 8px; cursor: pointer; position: relative;
}
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); }
.tabs button.active::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px;
    height: 2px; background: var(--gold); border-radius: 2px;
}
.tabs a {
    color: var(--muted); font-size: 13.5px; font-weight: 600;
    padding: 8px 14px; border-radius: 8px; position: relative;
}
.tabs a:hover { color: var(--text); }
.tabs a.tab-active { color: var(--text); }
.tabs a.tab-active::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px;
    height: 2px; background: var(--gold); border-radius: 2px;
}

/* ---------- Reels ---------- */
.reel-card { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--card-2); border: 1px solid var(--border-soft); aspect-ratio: 3 / 4; cursor: pointer; }
.reel-card img { width: 100%; height: 100%; object-fit: cover; }
.reel-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25), transparent 35%, transparent 55%, rgba(0,0,0,.85)); }
.reel-dur {
    position: absolute; top: 8px; left: 8px; z-index: 2;
    background: rgba(0,0,0,.65); font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px;
}
.reel-play {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 2;
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.25);
    display: flex; align-items: center; justify-content: center;
}
.reel-play svg { width: 18px; height: 18px; color: #fff; margin-left: 2px; }
.reel-info { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2; }
.reel-info b { display: block; font-size: 12.5px; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.85); }
.reel-info span { font-size: 11px; color: rgba(255,255,255,.88); display: block; text-shadow: 0 1px 6px rgba(0,0,0,.85); }
.reel-info .v { font-size: 11px; color: rgba(255,255,255,.75); display: flex; align-items: center; gap: 4px; margin-top: 3px; }
.reel-info .v svg { width: 12px; height: 12px; }

/* ---------- Groups ---------- */
.group-card { text-align: center; padding-bottom: 16px; }
.group-card .card-img { aspect-ratio: 16 / 9; }
.group-card .card-body { padding: 12px 14px 0; }
.group-card .members { font-size: 12px; color: var(--muted-2); margin: 2px 0 12px; }
.group-card .btn-outline { margin: 0 14px; width: calc(100% - 28px); justify-content: center; padding: 9px 0; font-size: 13px; }

/* ---------- Equipment ---------- */
.eq-card .card-body { text-align: left; }
.eq-cat { font-size: 12px; color: var(--muted-2); margin: 0 0 6px; }
.eq-rating { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.eq-rating svg { width: 14px; height: 14px; color: var(--gold-soft); }
.eq-rating b { color: var(--text); }

/* ---------- Avatars ---------- */
.avatar {
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; color: #101010;
}
.av-1 { background: linear-gradient(135deg, #e8262f, #8a1c22); }
.av-2 { background: linear-gradient(135deg, #7aa2f7, #2c3e6e); }
.av-3 { background: linear-gradient(135deg, #e5486f, #6e1f36); }
.av-4 { background: linear-gradient(135deg, #4ade80, #14532d); }
.av-5 { background: linear-gradient(135deg, #c084fc, #4c1d95); }

/* ---------- Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 18px; position: sticky; top: calc(var(--nav-h) + 22px); }
.side-card { background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--radius); padding: 18px; }
.side-card h3 { font-size: 14.5px; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.side-card h3 svg { width: 17px; height: 17px; color: var(--gold); }
.side-card h3 .view-all { margin-left: auto; }

.mini-tabs { display: flex; gap: 2px; margin-bottom: 12px; }
.mini-tabs button { background: none; border: 0; color: var(--muted-2); font-size: 12.5px; font-weight: 600; padding: 6px 10px; border-radius: 7px; cursor: pointer; }
.mini-tabs button.active { color: var(--gold-soft); background: var(--gold-dim); }

.trend-item { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border-soft); }
.trend-item:last-child { border-bottom: 0; }
.trend-item .trend-thumb { width: 62px; height: 62px; border-radius: 9px; overflow: hidden; flex-shrink: 0; display: block; }
.trend-item .trend-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.trend-item:hover .trend-thumb img { transform: scale(1.12); }

/* ---------- Private banner ads ---------- */
.banner-ad { text-align: center; margin: 2px 0; }
.banner-ad .banner-tag { display: block; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 5px; }
.banner-ad img { max-width: 100%; height: auto; border-radius: 10px; display: inline-block; }
.feed-ad .banner-ad img { width: 100%; }
.banner-ad .banner-mobile { display: none; }
.banner-ad .swap-adsense { display: none; }
/* Rotating banner slot: slides crossfade, the active one defines the height. */
.banner-rotate { position: relative; }
.banner-rotate .br-slide { display: block; opacity: 0; transition: opacity .8s ease; }
.banner-rotate .br-slide.on { opacity: 1; }
.banner-rotate .br-slide:not(.on) { position: absolute; inset: 0; pointer-events: none; }
.banner-rotate .br-slide img { width: 100%; display: block; }
@media (max-width: 760px) {
    .banner-rotate .br-slide img.banner-desktop { display: none; }
}
@media (max-width: 760px) {
    .banner-ad .banner-desktop { display: none; }
    .banner-ad .banner-mobile { display: block; margin: 0 auto; }
    .banner-ad.swap-mobile .swap-desktop { display: none; }
    .banner-ad.swap-mobile .swap-adsense { display: block; }
}
.trend-item b { display: block; font-size: 13px; line-height: 1.35; }

.member-row { display: flex; align-items: center; gap: 11px; padding: 8px 0; }
.member-row .rank { width: 18px; font-size: 13px; font-weight: 700; color: var(--muted-2); text-align: center; }
.member-row b { font-size: 13.5px; display: flex; align-items: center; gap: 6px; }
.member-row b svg { width: 13px; height: 13px; color: var(--gold); }
.member-row .pts { margin-left: auto; font-size: 12px; color: var(--muted-2); }

.brand-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.brand-tile {
    background: var(--card-2); border: 1px solid var(--border-soft); border-radius: 10px;
    padding: 16px 8px; text-align: center; font-weight: 800; font-size: 13px; letter-spacing: .04em;
}
.brand-tile:hover { border-color: var(--gold); color: var(--gold-soft); }

.quick-links a { display: flex; align-items: center; gap: 12px; padding: 9px 4px; font-size: 13.5px; color: var(--muted); border-radius: 8px; }
.quick-links a:hover { color: var(--text); background: var(--card-2); }
.quick-links svg { width: 18px; height: 18px; color: var(--gold); }

.cta-card {
    background: linear-gradient(135deg, #1d1507, #14161d 60%);
    border: 1px solid rgba(232,38,47,.35);
    border-radius: var(--radius); padding: 22px 18px; text-align: center;
}
.cta-card h4 { margin: 0 0 8px; font-size: 14px; letter-spacing: .12em; color: var(--gold-soft); }
.cta-card p { font-size: 12.5px; color: var(--muted); margin: 0 0 16px; }
.cta-card svg.wave { width: 44px; height: 44px; margin: 0 auto 10px; display: block; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border-soft); background: var(--bg-soft); margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.3fr; gap: 30px; padding: 44px 0 30px; }
.footer-grid h5 { font-size: 13px; margin: 0 0 14px; color: var(--text); }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 9px; }
.footer-links a { font-size: 13px; color: var(--muted); }
.footer-links a:hover { color: var(--gold-soft); }
.social-row { display: flex; gap: 10px; }
.social-row a {
    width: 34px; height: 34px; border-radius: 50%; background: var(--card-2);
    border: 1px solid var(--border-soft); display: inline-flex; align-items: center; justify-content: center;
    color: var(--muted); font-size: 13px; font-weight: 700;
}
.social-row a:hover { border-color: var(--gold); color: var(--gold-soft); }
.social-row svg { width: 15px; height: 15px; }
.newsletter p { font-size: 12.5px; color: var(--muted); margin: 0 0 12px; }
.news-form { display: flex; gap: 8px; }
.news-form input {
    flex: 1; background: var(--card-2); border: 1px solid var(--border-soft); color: var(--text);
    padding: 10px 14px; border-radius: 9px; font-size: 13px; outline: none;
}
.news-form input:focus { border-color: var(--gold); }
.footer-bottom {
    border-top: 1px solid var(--border-soft); padding: 16px 0;
    display: flex; justify-content: space-between; align-items: center;
    font-size: 12.5px; color: var(--muted-2);
}
.footer-bottom .heart { color: #e5486f; }

/* ---------- Auth pages ---------- */
.auth-wrap { max-width: 440px; margin: 60px auto; padding: 0 20px; }
.auth-card { background: var(--card); border: 1px solid var(--border-soft); border-radius: 16px; padding: 34px 32px; }
.auth-card h1 { font-size: 22px; margin: 0 0 6px; }
.auth-card .sub { color: var(--muted); font-size: 13.5px; margin: 0 0 22px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; }
.field input {
    width: 100%; background: var(--card-2); border: 1px solid var(--border);
    color: var(--text); padding: 12px 14px; border-radius: 10px; font-size: 14px; outline: none;
}
.field textarea {
    width: 100%; background: var(--card-2); border: 1px solid var(--border);
    color: var(--text); padding: 12px 14px; border-radius: 10px; font-size: 14px; outline: none;
    font-family: inherit; resize: vertical;
}
.field textarea:focus { border-color: var(--gold); }
.field input:focus { border-color: var(--gold); }
.form-err { background: rgba(229,72,111,.1); border: 1px solid rgba(229,72,111,.4); color: #f08ca8; padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 16px; }
.form-ok { background: rgba(74,222,128,.1); border: 1px solid rgba(74,222,128,.4); color: #86efac; padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 16px; }
.auth-alt { text-align: center; margin-top: 18px; font-size: 13.5px; color: var(--muted); }
.auth-alt a { color: var(--gold-soft); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
    .grid-6 { grid-template-columns: repeat(3, 1fr); }
    .main-links { display: none; }
}
@media (max-width: 1024px) {
    .page-grid { grid-template-columns: 1fr; }
    .sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; }
    .hero { grid-template-columns: 1fr; }
    .hero-img { min-height: 240px; order: -1; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .grid-3, .grid-4, .grid-6 { grid-template-columns: 1fr 1fr; }
    .sidebar { grid-template-columns: 1fr; }
    .hero h1 { font-size: 32px; }
    .hero-copy { padding: 30px 24px; }
    .footer-grid { grid-template-columns: 1fr; }
}

/* Setup share card inside feed posts */
.setup-share {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 10px 0 12px;
    padding: 10px;
    background: var(--card-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    transition: border-color .2s;
}
.setup-share:hover { border-color: var(--gold); }
.setup-share img {
    width: 84px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}
.setup-share-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.setup-share-body b { color: var(--text); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.setup-share-body span { color: var(--gold-soft); font-size: 12.5px; font-weight: 600; }

/* Setup photo gallery (public setup page) */
.gallery-thumbs { display: flex; gap: 8px; padding: 12px 14px; flex-wrap: wrap; }
.gallery-thumbs img {
    width: 86px; height: 64px; object-fit: cover; border-radius: 8px;
    border: 1px solid var(--border); cursor: pointer; opacity: .75; transition: opacity .2s, border-color .2s;
}
.gallery-thumbs img:hover { opacity: 1; border-color: var(--gold); }

/* Photo manager (My Sound edit form) */
.img-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.img-cell { position: relative; }
.img-cell img { width: 120px; height: 90px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); display: block; }
.img-cell form { margin: 0; }
.img-remove {
    position: absolute; top: -8px; right: -8px;
    width: 24px; height: 24px; border-radius: 50%;
    background: #e5486f; color: #fff; border: 0; cursor: pointer;
    font-size: 15px; line-height: 1; display: none; align-items: center; justify-content: center;
}
.img-cell:hover .img-remove { display: inline-flex; }

/* Small helper text under form fields */
.hint { font-size: 12px; color: var(--muted-2); margin-top: 4px; }

/* Reels */
.reel-card video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.reel-card { display: block; }
.reel-view { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); }
.reel-view-video { background: #000; display: flex; align-items: center; min-height: 320px; }
.reel-view-video video { width: 100%; max-height: 72vh; }
.reel-view-side { padding: 22px 24px; }
@media (max-width: 720px) {
    .reel-view { grid-template-columns: 1fr; }
}

/* ---------- Light theme ---------- */
[data-theme="light"] {
    --bg: #f1f2f5;
    --bg-soft: #ffffff;
    --card: #ffffff;
    --card-2: #eceef3;
    --border: #dfe2e9;
    --border-soft: #e9ecf2;
    --text: #161a22;
    --muted: #5a6172;
    --muted-2: #8b91a4;
    --gold: #d97706;
    --gold-soft: #b45309;
    --gold-dim: rgba(217, 119, 6, .12);
}
body { transition: background-color .3s ease, color .3s ease; }

/* Light theme: keep the black header bar; force its text light so the logo
   and nav stay as prominent as in dark mode */
[data-theme="light"] .site-nav {
    background: rgba(10, 11, 16, .96);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
[data-theme="light"] .brand-name { color: #f5f5f4; }
[data-theme="light"] .brand-tag { color: #a1a1aa; }
[data-theme="light"] .main-links a { color: #a1a1aa; }
[data-theme="light"] .main-links a:hover,
[data-theme="light"] .main-links a.active { color: #f5f5f4; }
[data-theme="light"] .site-nav .icon-btn { color: #a1a1aa; }
[data-theme="light"] .site-nav .icon-btn:hover { color: #f5f5f4; }

/* Theme toggle icon swap: show moon in dark mode, sun in light mode */
#theme-toggle .ic-sun { display: none; }
#theme-toggle .ic-moon { display: block; }
[data-theme="light"] #theme-toggle .ic-sun { display: block; }
[data-theme="light"] #theme-toggle .ic-moon { display: none; }

/* ---------- Spotlight (Setup of the Week showcase) ---------- */
.spotlight-title {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 54px; line-height: 1.06; font-weight: 700; margin: 0 0 18px;
}
.spotlight-title em { color: var(--gold-soft); font-style: italic; }
.spotlight-pills { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 22px; }
.spotlight-pill {
    background: var(--card); border: 1px solid var(--border-soft); border-radius: 12px;
    padding: 12px 20px; text-align: center; min-width: 210px;
}
.spotlight-pill .sp-label { display: block; font-size: 10px; letter-spacing: .18em; color: var(--muted-2); font-weight: 700; margin-bottom: 5px; }
.spotlight-pill b { display: block; font-size: 16px; color: var(--gold-soft); }
.spotlight-pill .sp-sub { font-size: 11.5px; color: var(--muted-2); }
.spotlight-tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 26px; }
.spotlight-tabs a {
    padding: 9px 18px; border-radius: 999px; border: 1px solid var(--border);
    color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none;
}
.spotlight-tabs a.active { background: var(--gold); border-color: var(--gold); color: #141414; }
.spotlight-tabs a:not(.active):hover { border-color: var(--gold); color: var(--gold-soft); }
.tab-cur { font-size: 10px; background: rgba(0,0,0,.25); padding: 2px 8px; border-radius: 20px; margin-left: 6px; }
.spotlight-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 26px; align-items: start; }
.sp-badge-champ {
    position: absolute; top: 14px; left: 14px;
    background: rgba(0,0,0,.65); border: 1px solid rgba(232,38,47,.6); color: var(--gold-soft);
    font-size: 11px; font-weight: 700; letter-spacing: .08em; padding: 7px 14px; border-radius: 999px;
}
.sp-badge-score {
    position: absolute; top: 14px; right: 14px;
    background: rgba(0,0,0,.65); border: 1px solid var(--border); color: var(--text);
    font-size: 12px; font-weight: 700; padding: 7px 14px; border-radius: 999px;
}
.sp-kicker { font-size: 11px; letter-spacing: .2em; font-weight: 700; color: var(--gold-soft); margin-bottom: 10px; }
.spotlight-rig { font-family: "Playfair Display", Georgia, serif; font-style: italic; font-size: 34px; margin: 0 0 12px; font-weight: 700; }
.sp-votes {
    display: flex; align-items: center; gap: 12px;
    background: var(--card); border: 1px solid var(--border-soft); border-radius: 12px;
    padding: 14px 18px; margin: 16px 0;
}
.sp-vote-num { font-size: 22px; font-weight: 800; color: var(--gold-soft); }
.sp-vote-label { font-size: 10px; letter-spacing: .14em; color: var(--muted-2); font-weight: 700; line-height: 1.5; }
.sp-badge-verified {
    display: inline-block; font-size: 12px; font-weight: 600; color: #86efac;
    border: 1px solid rgba(74,222,128,.35); background: rgba(74,222,128,.07);
    padding: 8px 16px; border-radius: 999px;
}
.sp-stage { background: var(--card); border: 1px solid var(--border-soft); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.sp-stage-head { display: flex; justify-content: space-between; font-size: 10.5px; letter-spacing: .14em; font-weight: 700; color: var(--gold-soft); margin-bottom: 8px; }
.sp-stage-head span:last-child { color: var(--muted-2); }
.sp-gear { font-size: 13.5px; padding: 5px 0; border-top: 1px solid var(--border-soft); }
.sp-gear:first-of-type { border-top: 0; }
.sp-gear span { color: var(--muted-2); font-size: 12.5px; margin-left: 6px; }
@media (max-width: 860px) {
    .spotlight-grid { grid-template-columns: 1fr; }
    .spotlight-title { font-size: 38px; }
    .spotlight-rig { font-size: 27px; }
}

/* ---------- Groups ---------- */
.group-cover-fallback {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 44px; font-weight: 800; color: rgba(255,255,255,.92);
}
.group-desc { font-size: 13px; color: var(--muted); margin: 4px 0 0; line-height: 1.45; }
.group-hero {
    position: relative; border-radius: 18px; overflow: hidden;
    background: var(--card-2); min-height: 200px;
    display: flex; align-items: flex-end;
}
.group-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.group-hero .group-cover-fallback { position: absolute; inset: 0; }
.group-hero-body {
    position: relative; z-index: 1; width: 100%;
    padding: 22px 24px;
    background: linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,0));
    color: #fff;
}
.group-hero-body h1 { font-family: 'Playfair Display', serif; font-size: 30px; margin: 0 0 6px; }
.group-hero-body p { margin: 0; opacity: .9; font-size: 14px; }
.member-chip { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.member-chip .who b { display: block; font-size: 14px; }
.member-chip .who span { font-size: 12px; color: var(--muted-2); }
.owner-badge {
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
    color: var(--gold); border: 1px solid var(--gold); border-radius: 20px; padding: 2px 8px; margin-left: 6px;
}

/* ---------- Facebook-style feed layout ---------- */
.feed-layout {
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr) 300px;
    gap: 24px; align-items: start;
    padding-top: 26px; padding-bottom: 60px;
    max-width: 1280px;
}
.feed-side { position: sticky; top: calc(var(--nav-h) + 20px); display: flex; flex-direction: column; gap: 16px; }
.feed-side .card { padding: 16px 18px; }
.feed-side h3 { font-size: 13px; margin: 0; letter-spacing: .04em; color: var(--muted); }
.feed-side-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }

.feed-profile { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.feed-profile b { color: var(--text); font-size: 15px; display: block; }
.feed-profile span { font-size: 12.5px; color: var(--muted-2); }
.feed-menu { display: flex; flex-direction: column; padding: 10px !important; }
.feed-menu a {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px;
    border-radius: 10px; color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none;
}
.feed-menu a:hover { background: var(--card-2); }
.feed-menu a span { width: 22px; text-align: center; }
.feed-shortcuts a {
    display: flex; align-items: center; gap: 10px; padding: 8px 4px;
    color: var(--text); font-size: 13.5px; font-weight: 500; text-decoration: none; border-radius: 8px;
}
.feed-shortcuts a:hover { background: var(--card-2); }
.sc-dot { width: 32px; height: 32px; border-radius: 50%; background: var(--gold-dim); border: 1px solid rgba(232,38,47,.35); flex-shrink: 0; }

.feed-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.feed-composer { padding: 18px 20px; }
.feed-composer-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.feed-composer-head input {
    flex: 1; background: var(--card-2); border: 1px solid var(--border);
    color: var(--text); padding: 11px 14px; border-radius: 999px; font-size: 14px;
}
.feed-composer textarea {
    width: 100%; background: var(--card-2); border: 1px solid var(--border); color: var(--text);
    padding: 12px 14px; border-radius: 12px; font-size: 14.5px; font-family: inherit; resize: vertical; margin-bottom: 10px;
}
.feed-composer-foot { display: flex; gap: 10px; align-items: center; }
.feed-composer-foot select {
    background: var(--card-2); border: 1px solid var(--border); color: var(--text);
    padding: 10px 12px; border-radius: 10px;
}
.feed-composer-foot .btn { margin-left: auto; border-radius: 999px; }
.feed-tabs { margin-bottom: 2px !important; }

.feed-post { padding: 20px 22px; }
.feed-post-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.feed-post-head > div { flex: 1; }
.feed-post-head b a { color: var(--text); font-size: 15px; }
.feed-post-head span { display: block; font-size: 12.5px; color: var(--muted-2); }
.feed-open { color: var(--muted-2); font-size: 20px; letter-spacing: 2px; text-decoration: none; padding: 4px 8px; }
.feed-open:hover { color: var(--text); }
.feed-post-title { font-size: 18px; margin: 0 0 8px; }
.feed-post-body { font-size: 15.5px; line-height: 1.65; white-space: pre-wrap; margin: 0 0 6px; color: var(--text); }
.feed-counts { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted-2); padding: 10px 2px; }
.feed-counts a { color: var(--muted-2); }
.feed-actions { display: flex; border-top: 1px solid var(--border-soft); padding-top: 8px; gap: 4px; }
.feed-act {
    flex: 1; background: none; border: 0; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 600;
    padding: 10px 4px; border-radius: 8px; cursor: pointer; text-align: center; text-decoration: none; display: block;
}
.feed-act:hover { background: var(--card-2); color: var(--text); }
.feed-act.on { color: var(--gold-soft); }
.feed-act:disabled { opacity: .45; cursor: default; }
.feed-empty { padding: 40px; text-align: center; color: var(--muted); }
.feed-dim { font-size: 13px; color: var(--muted-2); margin: 4px 0; }
.feed-dot-live { width: 9px; height: 9px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 8px #4ade80; }

.feed-online a, .feed-suggested a {
    display: flex; align-items: center; gap: 10px; padding: 7px 4px;
    color: var(--text); font-size: 13.5px; font-weight: 500; text-decoration: none; border-radius: 8px;
}
.feed-online a:hover, .feed-suggested a:hover { background: var(--card-2); }
.feed-suggested a span b { display: block; font-size: 13.5px; }
.feed-suggested a span i { font-style: normal; font-size: 12px; color: var(--muted-2); }

.feed-ad:empty { display: none; }
.ad-placeholder {
    border: 1px dashed var(--border); border-radius: 10px; padding: 26px 16px;
    text-align: center; font-size: 12.5px; color: var(--muted-2); background: var(--card-2);
}

@media (max-width: 1120px) {
    .feed-layout { grid-template-columns: minmax(0, 1fr) 300px; }
    .feed-left { display: none; }
}
@media (max-width: 820px) {
    .feed-layout { grid-template-columns: minmax(0, 1fr); }
    .feed-side { position: static; }
    .feed-right { order: 2; }
    .feed-post { padding: 16px; }
}

/* ---------- static info pages + contact ---------- */
.static-body { font-size: 15.5px; line-height: 1.7; color: var(--text); }
.static-body h3 { font-size: 17px; margin: 26px 0 8px; }
.static-body p { margin: 0 0 14px; }
.static-body ul { margin: 0 0 14px; padding-left: 22px; }
.static-body li { margin-bottom: 6px; }
.static-body a { color: var(--gold-soft); }
.form-ok { background: rgba(74,222,128,.1); border: 1px solid rgba(74,222,128,.4); color: #7ee2a8; padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 16px; }
.stack label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 14px; color: var(--text); }
.stack label input, .stack label textarea {
    display: block; width: 100%; margin-top: 7px; background: var(--card-2); border: 1px solid var(--border);
    color: var(--text); padding: 12px 14px; border-radius: 10px; font-size: 14px; font-family: inherit; outline: none;
}
.stack label input:focus, .stack label textarea:focus { border-color: var(--gold); }
.stack textarea { resize: vertical; }

/* ---------- Profile page ---------- */
.profile-wrap { max-width: 1020px; padding-top: 26px; padding-bottom: 60px; }
.profile-hero { overflow: hidden; padding: 0 !important; margin-bottom: 18px; }
.profile-cover {
    height: 220px;
    background: linear-gradient(120deg, #232323 0%, #3a3a3a 45%, #1c1c1c 100%);
    background-size: cover; background-position: center;
}
.profile-head { text-align: center; padding: 0 24px 26px; margin-top: -62px; }
.profile-avatar { position: relative; display: inline-block; margin-bottom: 10px; }
.profile-avatar img, .profile-avatar .avatar {
    width: 124px; height: 124px; border-radius: 50%; object-fit: cover;
    border: 4px solid var(--card); background: var(--card-2); font-size: 40px;
}
.profile-points {
    position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%);
    background: var(--gold); color: #1a1a1a; font-size: 12px; font-weight: 800;
    padding: 3px 12px; border-radius: 999px; white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0,0,0,.4);
}
.profile-head h1 { font-size: 26px; margin: 14px 0 4px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.verified {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%; background: #3b82f6;
    color: #fff; font-size: 13px; font-weight: 800;
}
.profile-since { color: var(--muted-2); font-size: 13px; margin: 0 0 8px; }
.profile-bio { color: var(--muted); font-size: 14.5px; max-width: 560px; margin: 0 auto 16px; line-height: 1.6; }
.profile-actions { display: flex; justify-content: center; gap: 10px; }

.profile-stats {
    display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 16px 10px !important; margin-bottom: 18px; text-align: center;
}
.profile-stats > div { border-left: 1px solid var(--border-soft); }
.profile-stats > div:first-child { border-left: 0; }
.profile-stats b { display: block; font-size: 19px; color: var(--text); }
.profile-stats span { font-size: 10.5px; letter-spacing: .08em; color: var(--muted-2); text-transform: uppercase; }

.profile-badges { display: flex; justify-content: center; gap: 12px; margin-bottom: 20px; }
.pbadge {
    width: 44px; height: 44px; border-radius: 12px; display: inline-flex;
    align-items: center; justify-content: center; font-size: 22px;
    background: var(--card-2); border: 1px solid var(--border-soft);
    filter: grayscale(1); opacity: .35;
}
.pbadge.earned { filter: none; opacity: 1; border-color: rgba(232,38,47,.5); background: var(--gold-dim); }

.profile-tabs {
    display: flex; justify-content: center; gap: 4px; margin-bottom: 24px;
    background: var(--card); border: 1px solid var(--border-soft);
    border-radius: 999px; padding: 6px; width: fit-content; margin-left: auto; margin-right: auto;
}
.profile-tabs a {
    padding: 9px 26px; border-radius: 999px; color: var(--muted);
    font-size: 14px; font-weight: 600; text-decoration: none;
}
.profile-tabs a:hover { color: var(--text); }
.profile-tabs a.on { color: var(--gold-soft); box-shadow: inset 0 -2px 0 var(--gold); border-radius: 0; }

.profile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pcard {
    position: relative; border-radius: var(--radius); overflow: hidden;
    background: var(--card); border: 1px solid var(--border-soft);
    text-decoration: none; display: block; transition: transform .15s ease;
}
.pcard:hover { transform: translateY(-3px); }
.pcard-img { display: block; aspect-ratio: 16 / 10; background: var(--card-2); overflow: hidden; }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pcard-text { display: flex; align-items: center; padding: 22px; }
.pcard-text span { color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.pcard-type {
    position: absolute; top: 10px; right: 10px; font-size: 11px; font-weight: 700;
    padding: 4px 11px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff;
    backdrop-filter: blur(4px);
}
.pcard-type.t-setup { color: #ff5a5a; }
.pcard-type.t-reel { color: #f87171; }
.pcard-type.t-post { color: #7aa2f7; }
.pcard-title {
    display: block; padding: 12px 14px 14px; color: var(--text);
    font-size: 14px; font-weight: 600; line-height: 1.4;
}
.people-list { padding: 8px !important; }
.people-list a {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px;
    border-radius: 10px; color: var(--text); text-decoration: none; font-size: 14.5px;
}
.people-list a:hover { background: var(--card-2); }

@media (max-width: 760px) {
    .profile-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .profile-cover { height: 150px; }
    .profile-stats { grid-template-columns: repeat(5, 1fr); padding: 12px 4px !important; }
    .profile-stats b { font-size: 16px; }
    .profile-tabs a { padding: 8px 16px; font-size: 13px; }
}
@media (max-width: 480px) {
    .profile-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- composer attachments ---------- */
.attach-btn {
    display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
    background: var(--card-2); border: 1px solid var(--border); color: var(--muted);
    font-size: 13px; font-weight: 600; padding: 10px 14px; border-radius: 10px;
}
.attach-btn:hover { color: var(--text); border-color: var(--gold); }
.composer-preview { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 10px; }
.composer-preview[hidden] { display: none; }
.cp-thumb {
    position: relative; width: 86px; height: 86px; border-radius: 10px; overflow: hidden;
    background: var(--card-2); border: 1px solid var(--border);
}
.cp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-vid { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 28px; }
.cp-x {
    position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%;
    background: rgba(0,0,0,.7); color: #fff; border: 0; cursor: pointer; font-size: 14px; line-height: 1;
}

/* ---------- post media display ---------- */
.post-media { margin: 10px 0 4px; }
.post-media video { width: 100%; max-height: 480px; border-radius: 12px; background: #000; display: block; }
.pm-grid { display: grid; gap: 6px; border-radius: 12px; overflow: hidden; }
.pm-grid img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.pm-1 { grid-template-columns: 1fr; }
.pm-1 img { max-height: 480px; }
.pm-2 { grid-template-columns: 1fr 1fr; }
.pm-2 img { aspect-ratio: 1; }
.pm-3 { grid-template-columns: 1fr 1fr; }
.pm-3 img:first-child { grid-row: span 2; aspect-ratio: auto; min-height: 100%; }
.pm-3 img:not(:first-child) { aspect-ratio: 16/10; }
.pm-4 { grid-template-columns: 1fr 1fr; }
.pm-4 img { aspect-ratio: 1; }

/* ---------- Mobile navigation drawer ---------- */
.hamburger {
    display: none; background: none; border: 1px solid var(--border);
    border-radius: 10px; width: 38px; height: 38px; cursor: pointer;
    align-items: center; justify-content: center; color: var(--text);
}
.hamburger svg { width: 20px; height: 20px; }
.nav-drawer {
    position: fixed; top: 0; right: -300px; width: 280px; max-width: 84vw; height: 100dvh;
    background: var(--card); border-left: 1px solid var(--border-soft); z-index: 200;
    transition: right .25s ease; display: flex; flex-direction: column; padding: 0;
}
.nav-drawer.open { right: 0; }
.drawer-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 150;
    opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.drawer-backdrop.show { opacity: 1; pointer-events: auto; }
.drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px; border-bottom: 1px solid var(--border-soft);
}
.drawer-brand { font-weight: 800; font-size: 13px; letter-spacing: .08em; color: var(--gold-soft); }
.drawer-links { display: flex; flex-direction: column; padding: 12px; overflow-y: auto; }
.drawer-links a {
    padding: 13px 14px; border-radius: 10px; color: var(--text);
    font-size: 15px; font-weight: 600; text-decoration: none;
}
.drawer-links a:hover { background: var(--card-2); }
.drawer-links a.active { color: var(--gold-soft); background: var(--gold-dim); }

/* ---------- Responsive grids (replaces fixed inline grids) ---------- */
.rgrid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.rgrid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* ---------- Mobile polish ---------- */
@media (max-width: 1200px) {
    .hamburger { display: inline-flex; }
}
@media (max-width: 640px) {
    .wrap { padding: 0 14px; }
    /* keep the working theme toggle, hide the decorative icons on small screens */
    .nav-icons .icon-btn:nth-child(3),
    .nav-icons .icon-btn:nth-child(4),
    .nav-icons .notif-wrap,
    .nav-icons .icon-btn:nth-child(5) { display: none; }
    .brand-tag { display: none; }
    .rgrid-2 { grid-template-columns: 1fr; }
    .rgrid-3 { grid-template-columns: 1fr 1fr; }
    .feed-composer-foot { flex-wrap: wrap; }
    .feed-composer-foot .btn { margin-left: 0; width: 100%; justify-content: center; }
    .attach-btn { flex: 1; justify-content: center; }
    .profile-tabs { max-width: 100%; overflow-x: auto; }
    .profile-tabs a { white-space: nowrap; }
    .hero { padding: 36px 0; }
    .hero-cta .btn { padding: 13px 24px; font-size: 14px; }
    /* prevent iOS auto-zoom on focus */
    input, select, textarea { font-size: 16px !important; }
    .feed-post-body { font-size: 15px; }
    .card { border-radius: 14px; }
}
@media (max-width: 400px) {
    .rgrid-3 { grid-template-columns: 1fr; }
    .profile-stats span { font-size: 9px; }
}

/* ---------- Feed: article cards (image zoom on hover only) ---------- */
.post-card { overflow: hidden; padding: 0; }
.post-card-media { display: block; overflow: hidden; aspect-ratio: 16 / 9; background: var(--card-2); }
.post-card-media img, .post-card-media video { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.post-card-media:hover img, .post-card-media:hover video { transform: scale(1.06); }
.pc-body { padding: 14px 18px 14px; }
.pc-meta-row { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted-2); margin-bottom: 8px; }
.pc-author { display: inline-flex; align-items: center; gap: 7px; }
.pc-author .avatar, .pc-author .avatar-fallback { width: 22px; height: 22px; font-size: 10px; }
.pc-author b { font-size: 12.5px; color: var(--text); }
.pc-cat { color: var(--gold-soft); font-weight: 600; }
.pc-title { font-size: 17px; margin: 0 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-title:hover { color: var(--gold-soft); }
.pc-desc { font-size: 13.5px; color: var(--muted); margin: 0 0 12px; line-height: 1.55;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-bar { display: flex; align-items: center; gap: 4px; background: var(--card-2); border-radius: 10px; padding: 5px 12px; }
.pc-like { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; color: var(--muted);
    font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.pc-like:hover { color: var(--text); }
.pc-like.on { color: var(--gold-soft); }
.pc-stat { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13px; font-weight: 600;
    background: none; border: 0; font: inherit; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.pc-stat:hover { color: var(--text); }
.pc-date { margin-left: auto; font-size: 12px; color: var(--muted-2); white-space: nowrap; }
@media (max-width: 640px) {
    .pc-body { padding: 12px 14px; }
    .pc-title { font-size: 15.5px; }
}

/* ---------- Single post page: main + sidebar ---------- */
.post-layout {
    display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px;
    max-width: 1120px; padding-top: 26px; padding-bottom: 50px; align-items: start;
}
.post-main { min-width: 0; }
.post-side { position: sticky; top: calc(var(--nav-h) + 16px); display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.post-ad { padding: 16px; }
.post-related { padding: 16px 18px; }
.post-related h3 { margin: 0 0 6px; font-size: 15px; }
.rel-item { display: flex; gap: 10px; padding: 11px 0; border-top: 1px solid var(--border-soft); align-items: flex-start; }
.rel-item:first-of-type { border-top: 0; }
.rel-item .avatar, .rel-item .avatar-fallback { width: 34px; height: 34px; font-size: 13px; flex-shrink: 0; }
.rel-item b { display: block; font-size: 13.5px; line-height: 1.35; }
.rel-item:hover b { color: var(--gold-soft); }
.rel-item span { color: var(--muted-2); font-size: 12px; }
@media (max-width: 900px) {
    .post-layout { grid-template-columns: 1fr; }
    .post-side { position: static; }
}

/* ---------------- notification dropdown ---------------- */
.notif-wrap { position: relative; }
.notif-badge {
    position: absolute; top: 2px; right: 2px;
    min-width: 17px; height: 17px; padding: 0 4px;
    background: var(--red, #e8262f); color: #fff;
    font-size: 10px; font-weight: 700; line-height: 17px; text-align: center;
    border-radius: 999px; pointer-events: none;
}
.notif-dropdown {
    position: absolute; top: calc(100% + 10px); right: 0;
    width: 340px; max-width: calc(100vw - 32px);
    background: var(--card); border: 1px solid var(--border, rgba(255,255,255,.08));
    border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.5);
    z-index: 200; overflow: hidden;
}
.notif-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-bottom: 1px solid var(--border, rgba(255,255,255,.08));
    font-size: 14px;
}
.notif-mark {
    background: none; border: 0; cursor: pointer;
    color: var(--red, #e8262f); font-size: 12.5px; font-weight: 600;
}
.notif-mark:hover { text-decoration: underline; }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-empty { padding: 28px 20px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.6; }
.notif-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; text-decoration: none; color: inherit;
    border-bottom: 1px solid var(--border, rgba(255,255,255,.05));
}
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: rgba(255,255,255,.04); }
.notif-item.unread { background: rgba(232,38,47,.07); }
.notif-ico { font-size: 20px; flex-shrink: 0; }
.notif-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notif-title { font-size: 13.5px; line-height: 1.4; }
.notif-text small { color: var(--muted); font-size: 11.5px; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red, #e8262f); flex-shrink: 0; }
.notif-viewall {
    display: block; text-align: center; padding: 11px;
    font-size: 13px; font-weight: 600; color: var(--red, #e8262f); text-decoration: none;
    border-top: 1px solid var(--border, rgba(255,255,255,.08));
}
.notif-viewall:hover { background: rgba(255,255,255,.04); }
/* full notifications page */
.notif-page { max-width: 640px; margin: 0 auto; }
.notif-page .notif-item { border: 1px solid var(--border, rgba(255,255,255,.08)); border-radius: 12px; margin-bottom: 10px; }

/* ---------- Admin control panel ---------- */
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 20px; }
.admin-nav a { padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--muted); border: 1px solid var(--border-soft); border-radius: 999px; background: var(--card); }
.admin-nav a:hover { color: var(--text); border-color: var(--border); }
.admin-nav a.on { color: #fff; background: var(--gold); border-color: var(--gold); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 26px; }
.stat-card { background: var(--card); border: 1px solid var(--border-soft); border-radius: 12px; padding: 14px 16px; }
.stat-card b { display: block; font-size: 24px; }
.stat-card span { font-size: 12px; color: var(--muted); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { text-align: left; padding: 10px 12px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); border-bottom: 1px solid var(--border); }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.admin-table tr:hover td { background: rgba(255,255,255,.015); }
.type-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 20px; background: var(--card-2); border: 1px solid var(--border); color: var(--muted); text-transform: capitalize; }
.type-badge.news { color: #7aa2f7; border-color: rgba(122,162,247,.35); }
.status-active { color: #4ade80; font-weight: 700; font-size: 12px; }
.status-banned { color: #ff5a5a; font-weight: 700; font-size: 12px; }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-danger { background: transparent; color: #ff5a5a; border: 1px solid rgba(255,90,90,.4); }
.btn-danger:hover { background: rgba(255,90,90,.1); }
.admin-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.admin-filter input[type=text], .admin-filter select { background: var(--card-2); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 8px 12px; font-size: 13px; }
.pager { display: flex; gap: 8px; align-items: center; margin-top: 16px; font-size: 13px; color: var(--muted); }
.pager a { padding: 6px 12px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); }

/* ---------- Setup categories ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin-bottom: 30px; }
@media (max-width: 900px) { .cat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px) { .cat-grid { grid-template-columns: 1fr; } }
.cat-card { background: var(--card); border: 1px solid var(--border-soft); border-radius: 14px; padding: 20px;
    position: relative; overflow: hidden; transition: transform .15s ease, border-color .15s ease; display: block; }
.cat-card:hover { transform: translateY(-3px); border-color: var(--accent, var(--border)); }
.cat-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--accent, var(--gold)); opacity: .9; }
.cat-ico { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 24px; margin-bottom: 12px;
    background: color-mix(in srgb, var(--accent, var(--gold)) 14%, transparent);
    border: 2px solid var(--accent, var(--gold)); }
.cat-card h3 { font-size: 15.5px; margin: 0 0 7px; }
.cat-card p { font-size: 12.5px; color: var(--muted); line-height: 1.55; margin: 0 0 10px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cat-count { font-size: 12px; color: var(--muted-2); font-weight: 600; }
.cat-count b { color: var(--accent, var(--gold-soft)); }
.cat-hero { display: flex; gap: 16px; align-items: center; background: var(--card); border: 1px solid var(--border-soft);
    border-radius: 14px; padding: 20px 22px; margin-bottom: 22px; position: relative; overflow: hidden; }
.cat-hero::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--accent, var(--gold)); }
.cat-hero .cat-ico { margin-bottom: 0; flex-shrink: 0; }
.cat-hero h2 { font-size: 20px; margin: 0 0 6px; }
.cat-hero p { font-size: 13.5px; color: var(--muted); margin: 0; }
