/* Home v10: forum first, servers as a side column, compact rows, header inbox, footer columns. */

/* ---------- top row: forum + servers ---------- */
.home-v10 .home-top{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:20px;align-items:start}
.home-v10 .home-top-forum,.home-v10 .home-top-side{display:grid;gap:14px;min-width:0;align-content:start}
.home-v10 .home-top .section-heading{margin:0}
.home-v10 .home-forum-board .community-scroll{height:420px;max-height:60dvh}

.home-v10 .home-top-side .server-hub{display:block;background:transparent;border:0;border-radius:0;overflow:visible}
.home-v10 .home-top-side .server-list{padding:0;display:grid;gap:10px}
.home-v10 .home-top-side .server-row{grid-template-columns:minmax(0,1fr) 32px auto;grid-template-areas:"desc copy connect" "occ occ occ";gap:10px 8px;min-height:0;padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}
.home-v10 .home-top-side .server-row:last-child{border:1px solid var(--line)}
.home-v10 .home-top-side .server-row:hover{border-color:rgba(179,173,234,.4)}
.home-v10 .home-top-side .server-description{grid-area:desc;min-width:0}
.home-v10 .home-top-side .server-description{padding:0!important}
.home-v10 .home-top-side .server-occupancy{grid-area:occ;display:flex!important;flex-direction:row!important;align-items:center;gap:12px;padding:0!important;text-align:left}
.home-v10 .home-top-side .server-occupancy>span:first-child{flex:none;display:flex!important;align-items:center!important;gap:5px;line-height:1!important;min-width:64px}
.home-v10 .home-top-side .server-occupancy>span:first-child b{font-size:15px!important;line-height:1!important;font-weight:700}
.home-v10 .home-top-side .server-occupancy>span:first-child small{font-size:12px!important;line-height:1!important;color:var(--muted)}
.home-v10 .home-top-side .server-occupancy .status-dot{margin:0!important}
.home-v10 .home-top-side .server-occupancy .occupancy-track{flex:1;align-self:center!important;width:auto!important;height:4px!important;margin:0!important;border-radius:4px}
.home-v10 .home-top-side .server-occupancy .occupancy-track>i{height:100%!important;border-radius:4px}
.home-v10 .home-top-side .server-description{display:grid;gap:2px;align-self:center}
.home-v10 .home-top-side .server-name{line-height:1.25}
.home-v10 .home-top-side .server-map{font-size:11.5px;line-height:1.3}
.home-v10 .home-top-side .server-copy{width:32px;height:32px;align-self:center}
.home-v10 .home-top-side .server-connect{align-self:center}
.home-v10 .home-top-side .server-row{row-gap:12px!important}
@media (max-width:640px){.home-v10 .home-top-side .server-row{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"desc connect" "occ occ"}}
.home-v10 .home-top-side .server-occupancy .occupancy-track{margin-top:0}
.home-v10 .home-top-side .server-copy{grid-area:copy}
.home-v10 .home-top-side .server-connect{grid-area:connect;height:32px;padding:0 12px}
.home-v10 .home-top-side .server-name{font-size:15px;text-align:left}
.home-v10 .home-top-side .server-map{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.home-v10 .home-tg{display:grid;grid-template-columns:36px minmax(0,1fr) 16px;gap:12px;align-items:center;padding:12px 16px;border:1px solid rgba(179,173,234,.22);border-radius:14px;background:radial-gradient(140% 160% at 100% 0%,rgba(111,97,204,.24),transparent 60%),var(--surface);color:var(--text);transition:border-color 180ms}
.home-v10 .home-tg:hover{border-color:rgba(179,173,234,.5)}
.home-v10 .home-tg-icon{width:36px;height:36px;border-radius:10px;background:var(--violet);display:grid;place-items:center}
.home-v10 .home-tg-icon svg{width:18px;height:18px;color:#fff}
.home-v10 .home-tg-copy{display:grid;min-width:0}
.home-v10 .home-tg-copy strong{font-size:13px}
.home-v10 .home-tg-copy small{color:var(--muted);font-size:11px}
.home-v10 .home-tg>svg{width:16px;height:16px;color:var(--muted)}

/* ---------- giveaway · polls · events in one row ---------- */
.home-v10 .home-trio-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-areas:none;gap:20px;align-items:start}
.home-v10 .home-trio-cell{display:grid;gap:14px;min-width:0;align-content:start}
.home-v10 .home-trio-cell>.section-heading{margin:0}
.home-v10 .home-trio-cell>.section-heading h2{font-size:26px}
.home-v10 .home-trio-cell>*{grid-area:auto!important;grid-column:auto;min-width:0}
.home-v10 .home-trio-cell .public-giveaway-slot{width:100%}
.home-v10 .home-trio-cell .public-giveaway-slot>*{width:100%;flex:1 1 auto}
.home-v10 .home-trio-cell .home-polls{display:grid;grid-template-columns:minmax(0,1fr)!important;gap:14px;min-width:0}
.home-v10 .home-trio-cell .home-poll{width:100%}
.home-v10 .home-trio-cell .community-scroll{height:300px}

/* ---------- news + shop row ---------- */
.home-v10 .home-news-shop{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:14px 20px;align-items:stretch}
.home-v10 .home-news-shop>.news-section{display:contents}
.home-v10 .home-news-shop .news-section>.section-heading{grid-column:1/-1;margin:0}
.home-v10 .home-news-shop .home-news-grid{grid-column:1;grid-template-columns:minmax(0,1fr);gap:10px;min-width:0;align-content:start}
.home-v10 .home-news-shop .news-lead{position:relative;display:block;min-height:270px;height:100%;overflow:hidden;border-radius:16px;border:1px solid var(--line);padding:0}
.home-v10 .home-news-shop .news-lead-image{position:absolute;inset:0;aspect-ratio:auto;max-height:none;width:auto;height:auto;border-radius:0}
.home-v10 .home-news-shop .news-lead-image img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.home-v10 .home-news-shop .news-lead-image .news-category{z-index:2}
.home-v10 .home-news-shop .news-lead-copy{position:absolute;left:0;right:0;bottom:0;z-index:1;display:grid;gap:4px;padding:40px 20px 16px;background:linear-gradient(0deg,rgba(10,10,13,.94) 30%,rgba(10,10,13,0))}
.home-v10 .home-news-shop .news-lead-copy strong{font-size:18px;line-height:1.25}
.home-v10 .home-news-shop .news-lead-copy>span{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;color:var(--secondary);font-size:12px}
.home-v10 .home-news-shop .news-lead-copy time{color:var(--secondary);font-size:11px}
.home-v10 .home-news-shop .home-news-grid:has(.news-side-list:not(:empty)) .news-lead{height:auto;min-height:240px}

.home-v10 .home-shop-card{grid-column:2;padding:0 0 14px;display:flex;flex-direction:column}
.home-v10 .home-shop-card .community-heading{padding:0 20px}
.home-v10 .home-shop-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:14px 14px 0;flex:1;align-content:start}
.home-v10 .home-shop-item{display:grid;gap:3px;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--surface-hi);color:var(--text);transition:border-color 180ms}
.home-v10 .home-shop-item:hover{border-color:rgba(179,173,234,.45)}
.home-v10 .home-shop-item strong{font-size:13.5px}
.home-v10 .home-shop-item small{font-size:11.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.home-v10 .home-shop-item span{margin-top:6px;font-size:13px;font-weight:800;color:var(--accent)}
@media (max-width:1000px){
 .home-v10 .home-news-shop{grid-template-columns:minmax(0,1fr)}
 .home-v10 .home-shop-card{grid-column:1}
 .home-v10 .home-news-shop .news-lead{min-height:220px}
}

/* ---------- header inbox ---------- */
.header-inbox{position:relative;display:flex;align-items:center;gap:4px}
.header-inbox .inbox-button{position:relative}
.header-inbox .inbox-count{position:absolute;top:-4px;right:-5px;min-width:17px;height:17px;padding:0 4px;border-radius:99px;background:var(--violet);color:#fff;font-size:10px;font-weight:700;line-height:17px;text-align:center;border:2px solid var(--bg,#0a0a0d);font-variant-numeric:tabular-nums}
.header-inbox .inbox-count[hidden]{display:none}
.inbox-panel{position:absolute;top:calc(100% + 10px);right:0;z-index:60;width:min(360px,calc(100vw - 24px));background:var(--surface);border:1px solid rgba(255,255,255,.14);border-radius:16px;box-shadow:0 20px 50px rgba(0,0,0,.55);overflow:hidden}
.inbox-panel[hidden]{display:none}
.inbox-tabs{display:flex;gap:4px;padding:6px;border-bottom:1px solid var(--line)}
.inbox-tabs button{flex:1;border:0;background:transparent;border-radius:9px;padding:7px 8px;font-size:12px;font-weight:600;color:var(--muted);cursor:pointer}
.inbox-tabs button[aria-selected="true"]{background:var(--surface-hi);color:var(--text)}
.inbox-tabs b{color:var(--accent);font-weight:700}
.inbox-list{max-height:min(360px,60dvh);overflow-y:auto}
.inbox-list[hidden]{display:none}
.inbox-item{display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:10px;align-items:center;padding:10px 14px;border-bottom:1px solid var(--line);color:var(--text)}
.inbox-item:hover{background:var(--surface-hi)}
.inbox-item .inbox-avatar,.inbox-item .inbox-avatar img{width:34px;height:34px;border-radius:50%;object-fit:cover}
.inbox-copy{display:grid;min-width:0}
.inbox-copy strong{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.inbox-copy small{font-size:11.5px;color:var(--muted)}
.inbox-item.is-unread .inbox-copy strong::after{content:"";display:inline-block;width:6px;height:6px;margin-left:6px;border-radius:50%;background:var(--accent);vertical-align:2px}
.inbox-item time{font-size:11px;color:var(--muted);font-variant-numeric:tabular-nums}
.inbox-action{font-size:11.5px;font-weight:700;color:#fff;background:var(--violet);border-radius:8px;padding:4px 9px}
.inbox-empty{margin:0;padding:22px 14px;text-align:center;color:var(--muted);font-size:12.5px}
.inbox-foot{display:flex;justify-content:center;align-items:center;gap:6px;padding:10px;font-size:12px;color:var(--secondary)}
.inbox-foot:hover{color:var(--text);background:var(--surface-hi)}
.inbox-foot svg{width:14px;height:14px}
.inbox-toasts{position:fixed;z-index:70;top:calc(var(--top,64px) + 12px);right:calc(var(--chat,0px) + 16px);display:grid;gap:8px;width:min(300px,calc(100vw - 32px));pointer-events:none}
.inbox-toast{pointer-events:auto;display:grid;gap:2px;padding:12px 14px;border-radius:14px;background:var(--surface-hi);border:1px solid rgba(179,173,234,.32);box-shadow:0 16px 40px rgba(0,0,0,.5);color:var(--text);animation:inbox-toast .25s ease-out}
.inbox-toast small{color:var(--accent);font-size:11px;font-weight:700}
.inbox-toast b{font-size:13px}
@keyframes inbox-toast{from{transform:translateY(-8px)}to{transform:none}}

/* ---------- footer ---------- */
.footer.footer-v10{display:grid;grid-template-columns:minmax(0,1.4fr) repeat(3,minmax(0,1fr));gap:24px;align-items:start}
.footer-v10 .footer-col{display:grid;gap:8px;align-content:start;font-size:12.5px;min-width:0}
.footer-v10 .footer-col>b{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin-bottom:2px}
.footer-v10 .footer-col>a{color:var(--secondary)}
.footer-v10 .footer-col>a:hover{color:var(--text)}
.footer-v10 .footer-about p{margin:0;color:var(--muted);max-width:34ch;font-size:12px}
.footer-v10 .footer-socials{display:flex;gap:6px}
.footer-v10 .footer-socials a{width:32px;height:32px;display:grid;place-items:center;border:1px solid var(--line);border-radius:9px;color:var(--secondary)}
.footer-v10 .footer-socials a:hover{color:var(--text);border-color:rgba(179,173,234,.45)}
.footer-v10 .footer-socials svg{width:16px;height:16px}
.footer-v10 .footer-bottom{grid-column:1/-1;display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding-top:14px;border-top:1px solid var(--line);color:var(--muted);font-size:11.5px}

/* ---------- responsive ---------- */
@media (max-width:1279px){
 .home-v10 .home-top{grid-template-columns:minmax(0,1fr) 300px}
 .home-v10 .home-trio-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .home-v10 .home-trio-cell:last-child{grid-column:1/-1}
}
@media (max-width:1000px){
 .home-v10 .home-top{grid-template-columns:minmax(0,1fr)}
 .home-v10 .home-top-side{order:-1}
 .home-v10 .home-top-side .server-list{grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
 .footer.footer-v10{grid-template-columns:repeat(3,minmax(0,1fr))}
 .footer-v10 .footer-about{grid-column:1/-1}
}
@media (max-width:640px){
 .home-v10 .home-trio-grid{grid-template-columns:minmax(0,1fr)}
 .home-v10 .home-trio-cell:last-child{grid-column:auto}
 .home-v10 .home-forum-board .community-scroll{height:360px}
 .footer.footer-v10{grid-template-columns:repeat(2,minmax(0,1fr))}
 .inbox-panel{position:fixed;top:calc(var(--top,64px) + 8px);right:12px}
}
@media (prefers-reduced-motion:reduce){.inbox-toast{animation:none}}

/* ---------- compact rating + purchases ---------- */
.home-v10 .activity-showcase .rank-feature{min-height:64px!important;padding:10px 16px!important;grid-template-columns:42px minmax(0,1fr) auto!important;gap:12px}
.home-v10 .activity-showcase .rank-feature-avatar{width:42px!important;height:42px!important;padding:2px!important}
.home-v10 .activity-showcase .rank-feature-avatar :is(img,.rank-avatar){width:100%!important;height:100%!important}
.home-v10 .activity-showcase .rank-feature-copy small{font-size:10.5px}
.home-v10 .activity-showcase .rank-feature-copy strong{font-size:15px}
.home-v10 .activity-showcase .rank-feature-score b{font-size:20px}
.home-v10 .activity-showcase .rank-line{min-height:46px!important;padding-top:6px!important;padding-bottom:6px!important}

/* ---------- header inbox on phones: same row as the avatar ---------- */
@media (max-width:760px){
 .topbar .header-inbox{grid-row:1;grid-column:2;justify-self:end;align-self:center;margin-right:42px;gap:2px;z-index:2}
 .topbar .header-inbox .inbox-button{width:34px!important;height:34px!important;border:0;background:none}
 .topbar .header-inbox .inbox-button svg{width:19px;height:19px}
 .topbar .header-inbox .inbox-count{top:-2px;right:-3px}
}

/* server cards: keep the count + bar row full width on every screen */
.home-v10 .home-top-side .server-occupancy{justify-self:stretch!important;width:auto!important;max-width:none!important}
.home-v10 .home-top-side .server-occupancy>*{grid-area:auto!important;justify-content:flex-start!important}
@media (max-width:640px){.home-v10 .home-top-side .server-copy{grid-area:auto!important}}
.home-v10 .home-top-side .server-row{grid-template-rows:auto auto!important;min-height:0!important}

/* chat button in the phone header: same look as the bell and theme icons */
@media (max-width:760px){
 body .restore-chat{background:none!important;border:0!important;box-shadow:none!important;color:var(--muted)!important}
 body .restore-chat:is(:hover,:focus-visible){color:var(--accent)!important;background:var(--accent-wash,rgba(179,173,234,.1))!important}
 body .restore-chat>svg{width:20px!important;height:20px!important}
}
@media (max-width:760px){
 body:has(.topbar .notification-button:not([hidden])) .restore-chat{left:90px!important}
}
