/* RULAN market: compact image-first, two-column mobile cards. */
.community-container:has(.community-header.market) { padding:16px 16px 100px!important; background:radial-gradient(ellipse at 8% 0%,#c9e8e6 0%,transparent 48%),radial-gradient(ellipse at 100% 35%,#ecdedb 0%,transparent 65%),#eef0ed!important; border-radius:22px; }
.community-container:has(.community-header.market) .community-sections { display:none!important; }
.community-container .community-header.market { background:none!important; border:0!important; margin:0 0 14px!important; padding:6px 0 0!important; }
.community-container .community-header.market .community-header-content { margin:0!important; align-items:center; }
.community-container .community-header.market h1 { font-size:28px!important; font-weight:750!important; margin:0!important; }
.community-header.market .community-subtitle { display:none!important; }
.community-header.market .primary-button { padding:9px 14px!important; border:0!important; border-radius:13px!important; background:#244d3b15!important; color:#284f40!important; }
.community-container:has(.community-header.market) .community-tabs { display:grid!important; grid-template-columns:repeat(4,minmax(0,1fr)); gap:3px!important; border:1px solid #fff!important; border-radius:12px!important; padding:3px!important; background:#ffffff55!important; margin:0 0 14px!important; }
.community-container:has(.community-header.market) .tab-button { min-width:0; padding:10px 3px!important; border-radius:9px!important; font-size:13px!important; color:#66736e!important; }
.community-container:has(.community-header.market) .tab-button.active { background:#fff!important; color:#244a3b!important; box-shadow:0 2px 8px #345b4210; }
.community-container:has(.community-header.market) .tab-button::after { display:none!important; }
.community-container:has(.community-header.market) .community-quick-links { margin:0 0 12px!important; gap:8px!important; }
.community-container:has(.community-header.market) .link-button { padding:5px 8px!important; background:transparent!important; border:0!important; font-size:11px!important; }
.community-container:has(.community-header.market) .community-posts-grid { display:grid!important; grid-template-columns:repeat(4,minmax(0,1fr))!important; gap:14px!important; align-items:start; }
/* Portrait artwork remains the card surface; ordinary community posts are untouched. */
.community-posts-grid .community-post-card:has(.marketplace-info):has(.post-cover) { position:relative!important; isolation:isolate; aspect-ratio:3/4!important; min-height:0!important; background:#17201e!important; border:0!important; }
.community-posts-grid .community-post-card:has(.marketplace-info) .post-cover { position:absolute!important; inset:0; width:100%!important; height:100%!important; aspect-ratio:auto!important; margin:0!important; }
.community-posts-grid .community-post-card:has(.marketplace-info) .post-cover img { display:block; width:100%!important; height:100%!important; object-fit:cover!important; object-position:center top!important; }
.community-posts-grid .community-post-card:has(.marketplace-info):has(.post-cover) .post-card-content { position:absolute!important; inset:auto 0 0!important; z-index:1; padding:40px 12px 12px!important; background:linear-gradient(180deg,transparent 0%,rgba(9,17,19,.25) 25%,rgba(9,17,19,.82) 100%)!important; color:#fff!important; display:grid!important; grid-template-columns:1fr auto; gap:8px 12px; }
.community-posts-grid .community-post-card:has(.marketplace-info):has(.post-cover) :is(.post-author,.post-stats,.post-character-tag,.official-character-info,.market-character-tags,.marketplace-sales) { display:none!important; }
.community-posts-grid .community-post-card:has(.marketplace-info):has(.post-cover) .post-title { grid-column:1/-1; color:#fff!important; font-size:15px!important; line-height:1.45; margin:0!important; text-shadow:0 1px 6px #0006; -webkit-line-clamp:2; }
.community-posts-grid .community-post-card:has(.marketplace-info):has(.post-cover) .post-content-preview { grid-column:1/-1; color:#e0e5e4!important; font-size:12px!important; line-height:1.6; margin:0 0 4px!important; -webkit-line-clamp:2; }
.community-posts-grid .community-post-card:has(.marketplace-info):has(.post-cover) .marketplace-info { padding:0!important; margin:0!important; background:transparent!important; align-self:center; }
.community-posts-grid .community-post-card:has(.marketplace-info):has(.post-cover) .marketplace-price { color:#e2eae6!important; font-size:11px!important; font-weight:500; }
.community-posts-grid .community-post-card:has(.marketplace-info):has(.post-cover) .post-card-content>.btn { background:rgba(255,255,255,.14)!important; color:#fff!important; border:1px solid #ffffff54!important; border-radius:24px!important; min-height:44px; padding:6px 8px!important; margin:0!important; font-size:12px!important; }
.community-posts-grid .community-post-card:has(.marketplace-info) .btn:focus-visible { outline:2px solid white; outline-offset:3px; }
@media(max-width:480px) { .community-posts-grid .community-post-card:has(.marketplace-info):has(.post-cover) .post-card-content { padding:32px 10px 10px!important; gap:6px 10px; } }
.community-posts-grid .community-post-card:has(.marketplace-info) .post-cover { max-height:none!important; min-height:100%!important; }

.community-posts-grid .community-post-card:has(.marketplace-info):has(.post-cover) .post-content-preview { -webkit-line-clamp:1; font-size:11px!important; }
.community-posts-grid .community-post-card:has(.marketplace-info):has(.post-cover) .official-character-info { display:block!important; grid-column:1/-1; margin:0!important; color:white!important; font-size:15px!important; }
.community-posts-grid .community-post-card:has(.marketplace-info) .market-character-badge { display:none!important; }
.community-posts-grid .community-post-card:has(.marketplace-info):has(.official-character-info strong) .post-title { display:none!important; }
@media(max-width:900px) { .community-container:has(.community-header.market) .community-posts-grid { grid-template-columns:repeat(3,minmax(0,1fr))!important; } }
@media(max-width:600px) { .community-container:has(.community-header.market) .community-posts-grid { grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:10px!important; } .community-container:has(.community-header.market) { padding:12px 12px 100px!important; } }
