/* A617 — Pixel Battle Social UI v2
   Global flat redesign of feed, SlimeCraft promo, post composer, comments and profile wall.
   Designed mobile-first, with a dedicated desktop layout. */
:root{
  --pb-social-bg:#070a0f;
  --pb-social-surface:#0d131b;
  --pb-social-surface-2:#111923;
  --pb-social-surface-3:#151e29;
  --pb-social-border:rgba(229,236,246,.085);
  --pb-social-border-strong:rgba(229,236,246,.14);
  --pb-social-text:#f5f7fb;
  --pb-social-muted:#919cad;
  --pb-social-muted-2:#687487;
  --pb-social-accent:#8cff3f;
  --pb-social-accent-ink:#091106;
  --pb-social-accent-soft:rgba(140,255,63,.10);
  --pb-social-blue:#5ac8fa;
  --pb-social-danger:#ff6d78;
  --pb-social-radius-xl:24px;
  --pb-social-radius-lg:20px;
  --pb-social-radius-md:14px;
  --pb-social-shadow:0 18px 46px rgba(0,0,0,.24);
}

/* ---------- HOME LAYOUT ---------- */
.home-feed-shell{
  width:min(1160px,calc(100% - 28px))!important;
  margin:0 auto!important;
  padding:18px 0 calc(var(--pb-bottom-h,92px) + 34px)!important;
}
.home-feed-tabs{
  position:static!important;
  z-index:auto!important;
  display:flex!important;
  width:min(720px,100%)!important;
  gap:4px!important;
  margin:0 0 18px!important;
  padding:4px!important;
  border:1px solid var(--pb-social-border)!important;
  border-radius:18px!important;
  background:#0b1017!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
.home-feed-tab{
  flex:1 1 0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  min-width:0!important;
  min-height:44px!important;
  padding:0 14px!important;
  border:0!important;
  border-radius:14px!important;
  background:transparent!important;
  color:#8f99a9!important;
  font-size:13px!important;
  font-weight:800!important;
  letter-spacing:-.01em!important;
  box-shadow:none!important;
}
.home-feed-tab.is-active{
  color:#0b1207!important;
  background:var(--pb-social-accent)!important;
}
.home-feed-tab-badge{
  display:inline-grid!important;
  place-items:center!important;
  min-width:20px!important;
  height:20px!important;
  padding:0 6px!important;
  border:0!important;
  border-radius:999px!important;
  background:rgba(8,14,5,.16)!important;
  color:inherit!important;
  font-size:10px!important;
  font-weight:900!important;
}
.home-feed-layout{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 310px!important;
  grid-template-areas:"stream sidebar"!important;
  gap:24px!important;
  align-items:start!important;
}
.home-feed-stream{grid-area:stream!important;min-width:0!important}
.home-feed-sidebar{grid-area:sidebar!important;min-width:0!important;position:sticky!important;top:calc(var(--pb-topbar-h,64px) + 18px)!important}

/* ---------- INLINE COMPOSER LAUNCHER ---------- */
.home-compose-launcher,
.pb-profile-compose-launcher{
  width:100%!important;
  min-height:74px!important;
  display:grid!important;
  grid-template-columns:46px minmax(0,1fr) 42px!important;
  align-items:center!important;
  gap:12px!important;
  margin:0 0 14px!important;
  padding:12px 13px!important;
  border:1px solid var(--pb-social-border)!important;
  border-radius:20px!important;
  background:var(--pb-social-surface)!important;
  color:var(--pb-social-text)!important;
  text-decoration:none!important;
  text-align:left!important;
  box-shadow:none!important;
  cursor:pointer!important;
  transition:border-color .15s ease,background .15s ease!important;
}
.home-compose-launcher:hover,
.pb-profile-compose-launcher:hover{
  border-color:var(--pb-social-border-strong)!important;
  background:#101720!important;
}
.home-compose-launcher-avatar,
.pb-profile-compose-avatar{
  width:46px!important;
  height:46px!important;
  border-radius:14px!important;
  object-fit:cover!important;
  border:1px solid rgba(255,255,255,.07)!important;
  box-shadow:none!important;
}
.home-compose-launcher-copy,
.pb-profile-compose-copy{
  min-width:0!important;
  display:flex!important;
  flex-direction:column!important;
  gap:4px!important;
}
.home-compose-launcher-copy strong,
.pb-profile-compose-copy strong{
  color:#eef3f8!important;
  font-size:13px!important;
  line-height:1.15!important;
  font-weight:850!important;
}
.home-compose-launcher-copy span,
.pb-profile-compose-copy span{
  overflow:hidden!important;
  color:#707c8f!important;
  font-size:11px!important;
  line-height:1.25!important;
  font-weight:650!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
.home-compose-launcher-action,
.pb-profile-compose-open{
  width:42px!important;
  height:42px!important;
  display:grid!important;
  place-items:center!important;
  border-radius:13px!important;
  background:var(--pb-social-accent-soft)!important;
  color:var(--pb-social-accent)!important;
}
.home-compose-launcher-action svg{width:19px!important;height:19px!important}
.pb-profile-compose-open .pbpc-icon{width:18px!important;height:18px!important;background-color:currentColor!important}
.home-compose-launcher-guest-icon{
  width:46px;height:46px;display:grid;place-items:center;border-radius:14px;background:#151c25;color:#99a4b5;
}

/* ---------- SLIMECRAFT ---------- */
.home-slimecraft-ad{
  position:relative!important;
  display:grid!important;
  grid-template-columns:72px minmax(0,1fr)!important;
  gap:14px!important;
  min-height:0!important;
  padding:14px!important;
  border:1px solid rgba(140,255,63,.18)!important;
  border-radius:22px!important;
  background:#0c1510!important;
  overflow:hidden!important;
  box-shadow:none!important;
  text-decoration:none!important;
}
.home-slimecraft-ad::before,
.home-slimecraft-ad::after{display:none!important;content:none!important}
.home-slimecraft-ad-brand{
  width:72px!important;height:72px!important;display:block!important;overflow:hidden!important;
  border:1px solid rgba(255,255,255,.08)!important;border-radius:18px!important;background:#0b100c!important;
}
.home-slimecraft-ad-icon{width:100%!important;height:100%!important;object-fit:cover!important;border-radius:0!important}
.home-slimecraft-ad-copy{display:flex!important;min-width:0!important;flex-direction:column!important;justify-content:center!important;gap:6px!important;padding-right:38px!important}
.home-slimecraft-ad-kicker{color:var(--pb-social-accent)!important;font-size:9px!important;font-weight:900!important;line-height:1!important;letter-spacing:.09em!important;text-transform:uppercase!important}
.home-slimecraft-ad-title{color:#f4f7fb!important;font-size:19px!important;line-height:1.08!important;font-weight:900!important;letter-spacing:-.025em!important}
.home-slimecraft-ad-title em{color:#9ca7b6!important;font-size:.72em!important;font-style:normal!important;font-weight:800!important}
.home-slimecraft-ad-meta{display:flex!important;min-width:0!important;flex-direction:column!important;align-items:flex-start!important;gap:3px!important;color:#899586!important;font-size:10px!important;font-weight:750!important}
.home-slimecraft-ad-status{display:inline-flex!important;align-items:center!important;gap:6px!important;color:#d7e4d2!important;white-space:nowrap!important}
.home-slimecraft-ad-status i{width:7px!important;height:7px!important;border-radius:50%!important;background:var(--pb-social-accent)!important;box-shadow:none!important}
.home-slimecraft-ad-address{max-width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;color:#6f7c72!important}
.home-slimecraft-ad-cta{
  position:absolute!important;right:13px!important;bottom:13px!important;
  width:34px!important;height:34px!important;display:grid!important;place-items:center!important;
  border-radius:11px!important;background:var(--pb-social-accent)!important;color:#0a1207!important;
}
.home-slimecraft-ad-cta svg{width:17px!important;height:17px!important}
.home-ecosystem-note{
  display:grid!important;grid-template-columns:36px minmax(0,1fr)!important;gap:10px!important;
  margin-top:12px!important;padding:12px!important;border:1px solid var(--pb-social-border)!important;border-radius:18px!important;background:#0b1017!important;
}
.home-ecosystem-note-icon{width:36px;height:36px;display:grid;place-items:center;border-radius:11px;background:#141c26;color:#8995a7}
.home-ecosystem-note span:last-child{display:flex;min-width:0;flex-direction:column;gap:3px}
.home-ecosystem-note strong{font-size:11px;font-weight:850;color:#dde4ec}
.home-ecosystem-note small{font-size:9px;line-height:1.4;font-weight:650;color:#657184}

/* ---------- POSTS ---------- */
.home-feed-panel{min-width:0!important}
.home-feed-card{
  position:relative!important;
  margin:0 0 14px!important;
  padding:15px!important;
  overflow:hidden!important;
  border:1px solid var(--pb-social-border)!important;
  border-radius:22px!important;
  background:var(--pb-social-surface)!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
.home-feed-card::before,.home-feed-card::after{display:none!important;content:none!important}
.home-feed-card-news{border-color:rgba(90,200,250,.14)!important}
.home-feed-card-head{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto auto!important;
  gap:7px!important;
  align-items:center!important;
  min-width:0!important;
  margin:0 0 14px!important;
}
.home-feed-author{display:flex!important;align-items:center!important;min-width:0!important;gap:10px!important}
.home-feed-avatar-wrap{width:44px!important;height:44px!important;flex:0 0 44px!important;padding:0!important;border:0!important;border-radius:14px!important;background:#151b24!important;overflow:hidden!important;box-shadow:none!important}
.home-feed-avatar{width:100%!important;height:100%!important;display:block!important;object-fit:cover!important;border-radius:inherit!important}
.home-feed-author-body{min-width:0!important;display:flex!important;flex-direction:column!important}
.home-feed-author-line{display:flex!important;align-items:center!important;gap:5px!important;min-width:0!important}
.home-feed-name{max-width:min(42vw,330px)!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;color:#f2f5f9;font-size:14px!important;line-height:1.15!important;font-weight:850!important;letter-spacing:-.01em!important;text-decoration:none!important}
.home-feed-author-line .verify-img,.home-feed-author-line img,.home-feed-author-line video{width:16px!important;height:16px!important;max-width:16px!important;max-height:16px!important;flex:0 0 16px!important;object-fit:contain!important}
.home-feed-author-sub{margin-top:3px!important;color:#6e798a!important;font-size:10px!important;font-weight:650!important}
.home-feed-time{color:#717c8d!important;font-size:10px!important;font-weight:750!important;white-space:nowrap!important}
.home-feed-menu{width:34px!important;height:34px!important;display:grid!important;place-items:center!important;padding:0!important;border:0!important;border-radius:10px!important;background:transparent!important;color:#758092!important;text-decoration:none!important}
.home-feed-menu:hover{background:#151d27!important;color:#dbe2eb!important}
.home-feed-post-title{margin:0 0 8px!important;color:#f4f6fa!important;font-size:20px!important;line-height:1.2!important;font-weight:900!important;letter-spacing:-.025em!important}
.home-feed-text{margin:0 0 12px!important;color:#e9eef4!important;font-size:15px!important;line-height:1.54!important;font-weight:450!important;letter-spacing:-.005em!important}

/* Image handling: preserve original ratio, never crop a single post image. */
.home-feed-media{width:100%!important;margin:10px 0 12px!important;overflow:visible!important}
.home-feed-media-track{display:flex!important;align-items:flex-start!important;gap:8px!important;overflow-x:auto!important;overflow-y:hidden!important;padding:0!important;scroll-snap-type:x mandatory!important;scrollbar-width:none!important}
.home-feed-media-track::-webkit-scrollbar{display:none!important}
.home-feed-media-item{
  position:relative!important;display:block!important;flex:0 0 100%!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;aspect-ratio:auto!important;
  padding:0!important;overflow:hidden!important;border:1px solid rgba(255,255,255,.065)!important;border-radius:17px!important;background:#070a0f!important;scroll-snap-align:start!important;
}
.home-feed-media.is-gallery .home-feed-media-item{flex-basis:min(86%,620px)!important}
.home-feed-media-item::before,.home-feed-media-item::after{display:none!important;content:none!important}
.home-feed-media-item img{
  position:static!important;display:block!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;object-fit:contain!important;object-position:center!important;background:#080b10!important;transform:none!important;
}
.home-feed-media.is-single .home-feed-media-item,
.home-feed-media.is-single .home-feed-media-item img{aspect-ratio:auto!important;min-height:0!important;max-height:none!important}
.home-feed-media-count{position:absolute!important;top:10px!important;right:10px!important;z-index:3!important;min-width:0!important;padding:5px 8px!important;border:1px solid rgba(255,255,255,.08)!important;border-radius:999px!important;background:rgba(5,7,10,.76)!important;color:#fff!important;font-size:10px!important;font-weight:850!important;backdrop-filter:blur(8px)!important}

/* Video/audio keep their own proportions and sit after photo/video content. */
.home-feed-extra-media,.profile-post-extra-media{display:grid!important;gap:9px!important;margin:10px 0 12px!important}
.home-feed-extra-video,.profile-post-extra-video{overflow:hidden!important;border:1px solid var(--pb-social-border)!important;border-radius:17px!important;background:#070a0f!important}
.home-feed-extra-video video,.profile-post-extra-video video{display:block!important;width:100%!important;height:auto!important;max-height:72vh!important;background:#05070a!important;object-fit:contain!important}
.home-feed-extra-audio,.profile-post-extra-audio{display:grid!important;grid-template-columns:40px minmax(0,1fr)!important;gap:10px!important;align-items:center!important;padding:11px 12px!important;border:1px solid var(--pb-social-border)!important;border-radius:15px!important;background:#111820!important}
.home-feed-extra-audio-icon,.profile-post-extra-audio-icon{width:40px!important;height:40px!important;display:grid!important;place-items:center!important;border-radius:12px!important;background:rgba(140,255,63,.09)!important;color:var(--pb-social-accent)!important;font-size:19px!important;font-weight:900!important}
.home-feed-extra-audio-copy,.profile-post-extra-audio-copy{display:flex!important;min-width:0!important;flex-direction:column!important;gap:2px!important}
.home-feed-extra-audio-copy strong,.profile-post-extra-audio-copy strong{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;color:#edf2f7!important;font-size:12px!important;font-weight:800!important}
.home-feed-extra-audio-copy small,.profile-post-extra-audio-copy small{color:#6e798b!important;font-size:9px!important;font-weight:700!important}
.home-feed-extra-audio audio,.profile-post-extra-audio audio{grid-column:1/-1!important;width:100%!important;height:34px!important;margin-top:2px!important}

/* Actions are three equal independent controls across the whole card. */
.home-feed-actions{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:6px!important;
  width:100%!important;
  min-height:0!important;
  margin:2px 0 0!important;
  padding:10px 0 0!important;
  border:0!important;
  border-top:1px solid rgba(255,255,255,.06)!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.home-feed-action{
  width:100%!important;min-width:0!important;min-height:42px!important;
  display:flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;
  padding:0 8px!important;border:0!important;border-radius:12px!important;background:transparent!important;
  color:#7d8899!important;font-size:11px!important;font-weight:800!important;text-decoration:none!important;white-space:nowrap!important;
}
.home-feed-action:hover{background:#141b24!important;color:#d9e0e9!important}
.home-feed-action-icon{display:inline-grid!important;place-items:center!important;flex:0 0 auto!important}
.home-feed-action-icon svg{width:19px!important;height:19px!important}
.home-feed-action-count{font-size:12px!important;font-weight:850!important;color:inherit!important}
.home-feed-action-label{color:#657184!important;font-size:10px!important;font-weight:700!important}
.home-feed-like.is-active{background:rgba(140,255,63,.08)!important;color:var(--pb-social-accent)!important}
.home-feed-like.is-active .home-feed-action-label{color:#8ccf67!important}
.home-feed-view{cursor:default!important}

/* The old floating button is intentionally retired in A617. */
.home-feed-fab{display:none!important}

/* ---------- COMMENTS ---------- */
.home-sheet-backdrop{background:rgba(2,4,7,.66)!important;backdrop-filter:blur(5px)!important;-webkit-backdrop-filter:blur(5px)!important}
#home-comments-sheet{
  background:#0b1017!important;
  border:1px solid var(--pb-social-border)!important;
  box-shadow:0 -20px 60px rgba(0,0,0,.40)!important;
}
#home-comments-sheet .home-sheet-handle{width:44px!important;height:4px!important;margin:9px auto 7px!important;border-radius:999px!important;background:#3d4857!important}
#home-comments-sheet .home-sheet-head{min-height:56px!important;padding:8px 14px 10px!important;border-bottom:1px solid rgba(255,255,255,.055)!important}
#home-comments-sheet .home-sheet-title{font-size:17px!important;font-weight:900!important;letter-spacing:-.02em!important}
#home-comments-sheet .home-comments-count{min-width:24px!important;height:24px!important;padding:0 7px!important;border:0!important;border-radius:8px!important;background:#151d27!important;color:#8e99aa!important;font-size:10px!important;font-weight:850!important}
#home-comments-sheet .home-sheet-close{width:36px!important;height:36px!important;border:1px solid var(--pb-social-border)!important;border-radius:11px!important;background:#111820!important;color:#8a96a7!important}
.home-comments-list{display:flex!important;flex-direction:column!important;gap:12px!important;padding:14px!important}
.home-comment-item{gap:9px!important;padding:0!important;background:transparent!important;border:0!important}
.home-comment-item.is-reply{margin-left:28px!important}
.home-comment-thread-line{width:1px!important;background:#25303d!important}
.home-comment-avatar{width:36px!important;height:36px!important;border-radius:11px!important;object-fit:cover!important;box-shadow:none!important}
.home-comment-card{padding:9px 11px!important;border:0!important;border-radius:14px!important;background:#111820!important;box-shadow:none!important;backdrop-filter:none!important}
.home-comment-head{margin-bottom:4px!important}
.home-comment-name{font-size:12px!important;font-weight:850!important}
.home-comment-time{font-size:9px!important;color:#697587!important}
.home-comment-text{font-size:12px!important;line-height:1.46!important;color:#e3e9f0!important}
.home-comment-actions{display:flex!important;gap:2px!important;margin-top:6px!important}
.home-comment-actions button{min-height:27px!important;padding:0 7px!important;border:0!important;border-radius:8px!important;background:transparent!important;color:#728093!important;font-size:9px!important;font-weight:800!important}
.home-comment-actions button:hover{background:#171f2a!important;color:#d7dee8!important}
.home-comment-form{padding:10px 12px calc(10px + env(safe-area-inset-bottom,0px))!important;border-top:1px solid rgba(255,255,255,.06)!important;background:#0b1017!important}
.home-comment-compose{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto auto!important;align-items:end!important;gap:4px!important;min-height:46px!important;padding:4px!important;border:1px solid var(--pb-social-border)!important;border-radius:15px!important;background:#111820!important;box-shadow:none!important}
.home-comment-compose:focus-within{border-color:rgba(140,255,63,.22)!important;background:#121a23!important}
.home-comment-input-wrap textarea{min-height:36px!important;max-height:120px!important;padding:9px 4px!important;color:#edf2f8!important;font-size:12px!important;line-height:1.42!important}
.home-comment-compose .home-comment-send{width:38px!important;height:38px!important;border:0!important;border-radius:11px!important;background:var(--pb-social-accent)!important;color:var(--pb-social-accent-ink)!important}
.home-comment-compose .home-comment-gif-toggle,.home-comment-compose .home-comment-attach{width:38px!important;height:38px!important;border:0!important;border-radius:10px!important;background:transparent!important;color:#788496!important}

/* ---------- COMPOSER ---------- */
.pbpc-backdrop{background:rgba(2,4,7,.74)!important;backdrop-filter:blur(8px)!important;-webkit-backdrop-filter:blur(8px)!important}
.pbpc-sheet{
  width:min(720px,calc(100vw - 30px))!important;
  max-height:min(850px,calc(100dvh - 32px))!important;
  overflow:hidden!important;
  border:1px solid var(--pb-social-border)!important;
  border-radius:24px!important;
  background:#0b1017!important;
  box-shadow:0 28px 80px rgba(0,0,0,.5)!important;
}
.pbpc-handle{display:none!important}
.pbpc-head{min-height:64px!important;padding:13px 16px!important;border-bottom:1px solid rgba(255,255,255,.06)!important;background:#0b1017!important}
.pbpc-title{font-size:20px!important;font-weight:900!important;letter-spacing:-.025em!important}
.pbpc-destination{margin-top:2px!important;color:#6d798b!important;font-size:10px!important;font-weight:750!important}
.pbpc-close{width:38px!important;height:38px!important;border:1px solid var(--pb-social-border)!important;border-radius:12px!important;background:#111820!important;color:#8793a4!important}
.pbpc-body{padding:15px 16px 14px!important;overflow-y:auto!important;scrollbar-width:none!important}
.pbpc-body::-webkit-scrollbar{display:none!important}
.pbpc-author{display:grid!important;grid-template-columns:46px minmax(0,1fr)!important;gap:11px!important;align-items:center!important;padding:0 0 13px!important;border:0!important;background:transparent!important}
.pbpc-avatar{width:46px!important;height:46px!important;border:1px solid rgba(255,255,255,.07)!important;border-radius:14px!important;object-fit:cover!important;box-shadow:none!important}
.pbpc-author-meta{min-width:0!important}
.pbpc-author-name-row{display:flex!important;align-items:center!important;gap:5px!important;min-width:0!important}
.pbpc-author-name{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;color:#f1f4f8!important;font-size:14px!important;font-weight:900!important}
.pbpc-author-verify,.pbpc-author-pin{display:block!important;width:17px!important;height:17px!important;flex:0 0 17px!important;object-fit:contain!important}
.pbpc-author-pin{border-radius:4px!important;image-rendering:pixelated!important}
.pbpc-author-place{display:block!important;margin-top:3px!important;color:#6f7b8d!important;font-size:10px!important;font-weight:700!important}

.pbpc-compose-surface{
  margin:0!important;padding:0!important;border:1px solid var(--pb-social-border)!important;border-radius:18px!important;background:#0e141c!important;overflow:hidden!important;
}
.pbpc-textarea{
  width:100%!important;min-height:150px!important;max-height:300px!important;margin:0!important;padding:16px!important;
  resize:vertical!important;border:0!important;outline:0!important;border-radius:0!important;background:transparent!important;
  color:#f4f7fb!important;font-size:16px!important;line-height:1.5!important;font-weight:450!important;box-shadow:none!important;
}
.pbpc-textarea::placeholder{color:#566173!important}
.pbpc-textarea:focus{border:0!important;background:transparent!important;box-shadow:none!important}
.pbpc-media.pbu-queue{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;max-height:none!important;margin:0!important;padding:0 12px 12px!important}
.pbpc-poll-editor{margin:0 12px 12px!important;border:1px solid var(--pb-social-border)!important;border-radius:15px!important;background:#111820!important;background-image:none!important;box-shadow:none!important}

.pbpc-compose-options{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important;margin-top:11px!important}
.pbpc-feed-option{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding:11px 12px!important;border:0!important;border-radius:14px!important;background:#111820!important;background-image:none!important}
.pbpc-feed-copy{min-width:0!important}
.pbpc-feed-label{color:#e7ecf2!important;font-size:11px!important;font-weight:850!important}
.pbpc-feed-help{display:block!important;margin-top:3px!important;color:#667285!important;font-size:9px!important;line-height:1.35!important;font-weight:650!important}
.pbpc-attachments{padding:11px 12px!important;border-radius:14px!important;background:#0e141c!important}
.pbpc-attachments-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;margin-bottom:9px!important}
.pbpc-attachments-head>span:first-child{color:#cfd7e1!important;font-size:10px!important;font-weight:850!important;text-transform:uppercase!important;letter-spacing:.04em!important}
.pbpc-file-count{width:auto!important;margin:0!important;color:#626e80!important;font-size:8px!important;font-weight:700!important;text-align:right!important;white-space:normal!important}
.pbpc-toolbar{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:7px!important;margin:0!important;padding:0!important;overflow:visible!important}
.pbpc-tool{min-height:42px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;padding:0 9px!important;border:1px solid var(--pb-social-border)!important;border-radius:12px!important;background:#121a24!important;color:#93a0b2!important;font-size:10px!important;font-weight:800!important;white-space:nowrap!important}
.pbpc-tool:hover{border-color:var(--pb-social-border-strong)!important;background:#16202b!important;color:#eef2f7!important}
.pbpc-tool .pbpc-icon{width:16px!important;height:16px!important;background-color:currentColor!important}
.pbpc-error{margin-top:9px!important;font-size:10px!important}
.pbpc-extra-media-card{display:grid!important;grid-template-columns:38px minmax(0,1fr) 32px!important;align-items:center!important;gap:9px!important;min-height:58px!important;padding:9px 10px!important;border:1px solid var(--pb-social-border)!important;border-radius:14px!important;background:#111820!important}
.pbpc-extra-media-icon{width:38px!important;height:38px!important;border-radius:11px!important;background-color:var(--pb-social-accent)!important;mask:var(--pbpc-icon) center/18px 18px no-repeat!important;-webkit-mask:var(--pbpc-icon) center/18px 18px no-repeat!important}
.pbpc-extra-media-copy strong{font-size:11px!important;color:#edf2f7!important}
.pbpc-extra-media-copy small{font-size:9px!important;color:#687587!important}
.pbpc-extra-media-remove{width:32px!important;height:32px!important;border:0!important;border-radius:10px!important;background:transparent!important;color:#7d8898!important}
.pbpc-foot{padding:11px 16px 15px!important;border-top:1px solid rgba(255,255,255,.06)!important;background:#0b1017!important}
.pbpc-submit{min-height:48px!important;border-radius:14px!important;background:var(--pb-social-accent)!important;color:#091106!important;font-size:13px!important;font-weight:900!important;box-shadow:none!important}
.pbpc-submit:disabled{background:#1b232d!important;color:#596575!important;opacity:1!important}

/* ---------- PROFILE WALL ---------- */
.container[data-spa-content="profile"] .wall-area{
  border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;backdrop-filter:none!important;padding-left:0!important;padding-right:0!important;
}
.container[data-spa-content="profile"] .wall-area>h2{margin-bottom:14px!important;color:#f1f4f8!important;font-size:17px!important;letter-spacing:-.02em!important;text-transform:none!important}
.container[data-spa-content="profile"] .post-card{
  margin-bottom:14px!important;padding:15px!important;border:1px solid var(--pb-social-border)!important;border-radius:22px!important;background:var(--pb-social-surface)!important;box-shadow:none!important;
}
.container[data-spa-content="profile"] .post-header{margin-bottom:12px!important}
.container[data-spa-content="profile"] .post-author img{width:42px!important;height:42px!important;border-radius:13px!important;object-fit:cover!important;box-shadow:none!important}
.container[data-spa-content="profile"] .post-author-name{font-size:13px!important;font-weight:850!important}
.container[data-spa-content="profile"] .post-text{font-size:14px!important;line-height:1.54!important;color:#e8edf4!important}
.container[data-spa-content="profile"] .profile-post-media{margin:10px 0 12px!important}
.container[data-spa-content="profile"] .profile-post-media-item{height:auto!important;min-height:0!important;max-height:none!important;aspect-ratio:auto!important;border-radius:17px!important;background:#070a0f!important}
.container[data-spa-content="profile"] .profile-post-media-item img{position:static!important;display:block!important;width:100%!important;height:auto!important;max-height:none!important;object-fit:contain!important}
.container[data-spa-content="profile"] .post-footer{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;padding-top:10px!important;border-top:1px solid rgba(255,255,255,.06)!important}
.container[data-spa-content="profile"] .news-meta-like{min-height:38px!important;padding:0 12px!important;border:0!important;border-radius:11px!important;background:transparent!important;color:#7b8798!important}
.container[data-spa-content="profile"] .news-meta-like.active{background:rgba(140,255,63,.08)!important;color:var(--pb-social-accent)!important}

/* Profile comments follow the same comment language. */
.container[data-spa-content="profile"] .comments-section{margin-top:12px!important;padding-top:10px!important;border-top:1px solid rgba(255,255,255,.05)!important}
.container[data-spa-content="profile"] .profile-comments-list{display:flex!important;flex-direction:column!important;gap:10px!important}
.container[data-spa-content="profile"] .profile-comment-thread{margin:0!important;padding:0!important;border:0!important;background:transparent!important}
.container[data-spa-content="profile"] .profile-comment-item{display:grid!important;grid-template-columns:34px minmax(0,1fr)!important;gap:9px!important;margin:0!important;padding:0!important;background:transparent!important;border:0!important}
.container[data-spa-content="profile"] .profile-comment-item.is-reply{margin-left:27px!important}
.container[data-spa-content="profile"] .profile-comment-avatar{width:34px!important;height:34px!important;border-radius:10px!important;object-fit:cover!important;border:0!important;box-shadow:none!important}
.container[data-spa-content="profile"] .profile-comment-body{min-width:0!important;padding:9px 11px!important;border:0!important;border-radius:13px!important;background:#111820!important}
.container[data-spa-content="profile"] .profile-comment-head{display:flex!important;align-items:center!important;gap:5px!important;min-width:0!important}
.container[data-spa-content="profile"] .profile-comment-name{font-size:11px!important;font-weight:850!important}
.container[data-spa-content="profile"] .profile-comment-time{margin-left:auto!important;color:#626e80!important;font-size:8px!important;font-weight:700!important}
.container[data-spa-content="profile"] .profile-comment-text{margin-top:4px!important;color:#e8edf4!important;font-size:11px!important;line-height:1.46!important}
.container[data-spa-content="profile"] .profile-comment-actions{display:flex!important;gap:2px!important;margin-top:5px!important}
.container[data-spa-content="profile"] .profile-comment-action{min-height:26px!important;padding:0 7px!important;border:0!important;border-radius:8px!important;background:transparent!important;color:#748194!important;font-size:8px!important;font-weight:800!important}
.container[data-spa-content="profile"] .profile-comment-action.is-liked{color:var(--pb-social-accent)!important;background:rgba(140,255,63,.06)!important}
.container[data-spa-content="profile"] .profile-comment-compose{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;gap:4px!important;align-items:end!important;min-height:46px!important;padding:4px!important;border:1px solid var(--pb-social-border)!important;border-radius:14px!important;background:#111820!important}
.container[data-spa-content="profile"] .comment-input{min-height:38px!important;max-height:120px!important;padding:10px 4px!important;border:0!important;outline:0!important;background:transparent!important;color:#edf2f8!important;font-size:11px!important;line-height:1.4!important;box-shadow:none!important}
.container[data-spa-content="profile"] .profile-comment-gif-button,
.container[data-spa-content="profile"] .comment-submit-btn{width:38px!important;height:38px!important;border:0!important;border-radius:10px!important;background:transparent!important;color:#7c8899!important}
.container[data-spa-content="profile"] .comment-submit-btn{background:var(--pb-social-accent)!important;color:#091106!important}

/* ---------- DESKTOP ---------- */
@media (min-width:1000px){
  .home-feed-shell{width:min(1160px,calc(100% - 56px))!important;padding-top:24px!important}
  .home-feed-tabs{width:720px!important;margin-bottom:20px!important}
  .home-feed-sidebar{top:calc(var(--pb-topbar-h,64px) + 22px)!important}
  .home-feed-card{padding:17px!important;border-radius:23px!important}
  .home-feed-text{font-size:15px!important}
  .home-feed-action-label{display:inline!important}
  .home-slimecraft-ad{padding:15px!important}
  #home-comments-sheet{
    top:calc(var(--pb-topbar-h,64px) + 20px)!important;
    right:20px!important;
    bottom:20px!important;
    left:auto!important;
    width:min(430px,calc(100vw - 40px))!important;
    height:auto!important;
    max-height:none!important;
    border-radius:22px!important;
    transform:translateX(calc(100% + 30px))!important;
  }
  #home-comments-sheet.is-open{transform:translateX(0)!important}
  #home-comments-sheet .home-sheet-handle{display:none!important}
  .pbpc-compose-options{grid-template-columns:minmax(0,.88fr) minmax(0,1.12fr)!important;align-items:stretch!important}
  .pbpc-feed-option{min-height:78px!important}
  .pbpc-attachments{min-height:78px!important}
}

/* ---------- TABLET / MOBILE ---------- */
@media (max-width:999px){
  .home-feed-shell{width:min(760px,calc(100% - 20px))!important;padding-top:12px!important}
  .home-feed-layout{display:flex!important;flex-direction:column!important;gap:0!important}
  .home-feed-sidebar{order:0!important;position:static!important;margin-bottom:12px!important}
  .home-feed-stream{order:1!important}
  .home-ecosystem-note{display:none!important}
  .home-slimecraft-ad{grid-template-columns:60px minmax(0,1fr) 38px!important;align-items:center!important;padding:11px 12px!important}
  .home-slimecraft-ad-brand{width:60px!important;height:60px!important;border-radius:15px!important}
  .home-slimecraft-ad-copy{padding-right:0!important;gap:4px!important}
  .home-slimecraft-ad-title{font-size:18px!important}
  .home-slimecraft-ad-meta{flex-direction:row!important;align-items:center!important;gap:8px!important;font-size:9px!important}
  .home-slimecraft-ad-cta{position:static!important;width:38px!important;height:38px!important;border-radius:12px!important}
}

@media (max-width:600px){
  .home-feed-shell{width:100%!important;padding:10px 10px calc(var(--pb-bottom-h,92px) + 24px)!important}
  .home-feed-tabs{width:100%!important;margin:0 0 12px!important;padding:3px!important;border-radius:16px!important}
  .home-feed-tab{min-height:42px!important;padding:0 8px!important;border-radius:13px!important;font-size:12px!important}
  .home-slimecraft-ad{margin-bottom:0!important;border-radius:18px!important}
  .home-slimecraft-ad-title{font-size:17px!important}
  .home-slimecraft-ad-address{max-width:135px!important}
  .home-compose-launcher,.pb-profile-compose-launcher{min-height:68px!important;grid-template-columns:42px minmax(0,1fr) 38px!important;gap:10px!important;padding:10px 11px!important;border-radius:17px!important}
  .home-compose-launcher-avatar,.pb-profile-compose-avatar{width:42px!important;height:42px!important;border-radius:12px!important}
  .home-compose-launcher-action,.pb-profile-compose-open{width:38px!important;height:38px!important;border-radius:11px!important}
  .home-feed-card{padding:13px!important;border-radius:18px!important;margin-bottom:10px!important}
  .home-feed-card-head{margin-bottom:12px!important}
  .home-feed-avatar-wrap{width:40px!important;height:40px!important;flex-basis:40px!important;border-radius:12px!important}
  .home-feed-name{max-width:41vw!important;font-size:13px!important}
  .home-feed-text{font-size:14px!important;line-height:1.5!important;margin-bottom:10px!important}
  .home-feed-media{margin:8px 0 10px!important}
  .home-feed-media-item{border-radius:15px!important}
  .home-feed-media.is-gallery .home-feed-media-item{flex-basis:91%!important}
  .home-feed-actions{gap:4px!important;padding-top:8px!important}
  .home-feed-action{min-height:40px!important;padding:0 4px!important;gap:5px!important}
  .home-feed-action-label{display:none!important}
  .home-feed-action-count{font-size:11px!important}
  .home-feed-action-icon svg{width:19px!important;height:19px!important}

  #home-comments-sheet{width:100%!important;height:min(82dvh,720px)!important;max-height:calc(100dvh - 8px)!important;left:0!important;right:0!important;bottom:0!important;border-radius:22px 22px 0 0!important;border-left:0!important;border-right:0!important;border-bottom:0!important}
  .home-comments-list{padding:12px!important}

  .pbpc-sheet{width:100%!important;max-height:calc(100dvh - 4px)!important;border-radius:22px 22px 0 0!important;border-left:0!important;border-right:0!important;border-bottom:0!important}
  .pbpc-handle{display:block!important;width:42px!important;height:4px!important;margin:8px auto 0!important;border-radius:999px!important;background:#3b4655!important}
  .pbpc-head{min-height:58px!important;padding:10px 13px!important}
  .pbpc-title{font-size:18px!important}
  .pbpc-body{padding:12px 13px!important}
  .pbpc-author{grid-template-columns:42px minmax(0,1fr)!important;gap:10px!important;padding-bottom:11px!important}
  .pbpc-avatar{width:42px!important;height:42px!important;border-radius:12px!important}
  .pbpc-textarea{min-height:140px!important;padding:14px!important;font-size:15px!important}
  .pbpc-compose-options{gap:8px!important;margin-top:9px!important}
  .pbpc-feed-option{padding:10px 11px!important;border-radius:13px!important}
  .pbpc-attachments{padding:10px!important;border-radius:13px!important}
  .pbpc-attachments-head{align-items:flex-start!important;flex-direction:column!important;gap:3px!important;margin-bottom:8px!important}
  .pbpc-file-count{text-align:left!important;font-size:8px!important}
  .pbpc-toolbar{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important}
  .pbpc-tool{min-height:42px!important;padding:0 4px!important;border-radius:10px!important;font-size:9px!important;gap:4px!important}
  .pbpc-tool .pbpc-icon{width:15px!important;height:15px!important}
  .pbpc-foot{padding:10px 13px calc(12px + env(safe-area-inset-bottom,0px))!important}
  .pbpc-submit{min-height:48px!important}
}

@media (max-width:390px){
  .home-slimecraft-ad-address{display:none!important}
  .home-compose-launcher-copy span,.pb-profile-compose-copy span{max-width:50vw!important}
  .pbpc-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .pbpc-tool{justify-content:flex-start!important;padding:0 10px!important}
}


/* ==========================================================================\n   A618 — feed stability + role colors + homepage online control\n   ========================================================================== */

/* The A617 natural-ratio override conflicted with the older feed_media loader:
   feed_media.css kept images at opacity:0 until its crop pass finished. On
   mobile/SPA navigation that pass can be delayed, leaving enormous empty post
   cards. A618 renders the real media immediately and leaves the crop variables
   irrelevant for the flat feed. */
.home-feed-media-track,
.profile-post-media-track{
  min-height:0!important;
}
.home-feed-media.is-single .home-feed-media-track,
.profile-post-media--single .profile-post-media-track{
  display:block!important;
  overflow:visible!important;
}
.home-feed-media-item,
.profile-post-media-item{
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  aspect-ratio:auto!important;
  contain:none!important;
  background:#070a0f!important;
  background-image:none!important;
  animation:none!important;
}
.home-feed-media-item:not(.pb-media-ready):not(.pb-media-error),
.profile-post-media-item:not(.pb-media-ready):not(.pb-media-error){
  background:#070a0f!important;
  background-image:none!important;
  animation:none!important;
}
.home-feed-media-item>img[data-pb-media],
.profile-post-media-item>img[data-pb-media]{
  position:static!important;
  inset:auto!important;
  display:block!important;
  width:100%!important;
  height:auto!important;
  min-width:0!important;
  min-height:0!important;
  max-width:100%!important;
  max-height:min(72vh,760px)!important;
  margin:0 auto!important;
  object-fit:contain!important;
  object-position:center!important;
  opacity:1!important;
  visibility:visible!important;
  filter:none!important;
  transform:none!important;
  border-radius:inherit!important;
  background:#070a0f!important;
}
.home-feed-media-item.pb-media-error,
.profile-post-media-item.pb-media-error{
  display:none!important;
  min-height:0!important;
  aspect-ratio:auto!important;
}
.home-feed-media.is-gallery .home-feed-media-item{
  flex:0 0 min(86%,620px)!important;
  width:min(86%,620px)!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  aspect-ratio:auto!important;
}
.home-feed-media.is-gallery .home-feed-media-item>img[data-pb-media]{
  position:static!important;
  width:100%!important;
  height:auto!important;
  max-height:min(68vh,680px)!important;
  object-fit:contain!important;
}

/* Role color comes from the inline style produced by renderRoleStyle().
   Do not repaint all nicknames white in the flat skin. */
.home-feed-name{color:#f2f5f9}

/* Compact real-time online button next to the profile avatar on the homepage. */
#pb-topbar .pb-tb-online-chip{
  height:30px!important;
  min-width:48px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  padding:0 8px!important;
  border:1px solid rgba(125,255,55,.18)!important;
  border-radius:999px!important;
  background:rgba(125,255,55,.075)!important;
  color:#a7ff72!important;
  text-decoration:none!important;
  font-size:9px!important;
  line-height:1!important;
  font-weight:900!important;
  white-space:nowrap!important;
  box-shadow:none!important;
}
#pb-topbar .pb-tb-online-chip i{
  width:7px!important;
  height:7px!important;
  flex:0 0 7px!important;
  border-radius:50%!important;
  background:#3cf05c!important;
  box-shadow:0 0 0 3px rgba(60,240,92,.08)!important;
}
#pb-topbar .pb-tb-online-chip b{font:inherit!important;color:inherit!important}
#pb-topbar .pb-tb-online-chip span{font:inherit!important;color:#738468!important}
#pb-topbar .pb-tb-online-chip:hover{background:rgba(125,255,55,.11)!important;border-color:rgba(125,255,55,.28)!important}

@media(max-width:430px){
  .home-feed-media-item>img[data-pb-media],
  .profile-post-media-item>img[data-pb-media]{max-height:68dvh!important}
  .home-feed-media.is-gallery .home-feed-media-item{flex-basis:90%!important;width:90%!important}
  #pb-topbar .pb-tb-online-chip{min-width:34px!important;padding:0 7px!important;gap:4px!important}
  #pb-topbar .pb-tb-online-chip span{display:none!important}
}
