/* FriendHub 2.6.5: decorations are anchored to their profile card; no fixed layers. */
.brand.fh263-branded img,
.brand img[src*="fh/v263/logo"],
.brand img[alt="FriendHub"] {
  filter:drop-shadow(0 7px 8px rgba(0,6,25,.7)) drop-shadow(0 1px 4px rgba(108,162,255,.34)) !important;
}

/* Older overhaul effects are retired. Older purchases are left in SQLite. */
#profile-card .fh81-deco,#user-card .fh81-deco,
#profile-card .fh842-deco,#user-card .fh842-deco,
#profile-card .fh84-deco,#user-card .fh84-deco,
#profile-card .fh831-deco,#user-card .fh831-deco,
#profile-card .fh832-deco,#user-card .fh832-deco,
#profile-card .fh833-frame-host,#user-card .fh833-frame-host,
#profile-card .fh833-chain-clip,#user-card .fh833-chain-clip,
#profile-card > .fh833-moth,#user-card > .fh833-moth,
#profile-card > .fh833-eyes,#user-card > .fh833-eyes,
#fh832-decor-viewport,
.fh842-avatar-frame,.fh84-frame,.fh831-avatar-frame { display:none!important; }


/* Reset the padding legacy V8.3.x overhaul scripts left on profile paragraphs. */
#profile-card.fh265-card.fh833-has-bones > .profile-top,
#user-card.fh265-card.fh833-has-bones > .profile-top {padding-left:0!important}
#profile-card.fh265-card.fh833-has-bones > p,
#user-card.fh265-card.fh833-has-bones > p {margin-left:12px!important}
#profile-card.fh265-card.fh833-has-eyes > .profile-top,
#user-card.fh265-card.fh833-has-eyes > .profile-top {padding-right:0!important;min-height:0!important}

#profile-card.fh265-card,#user-card.fh265-card {
  position:relative!important;
  isolation:isolate;
  overflow:visible!important;
  min-width:0;
}
.fh265-card .banner {position:relative;z-index:3}
.fh265-card .profile-top,
.fh265-card .profile-top ~ * {position:relative;z-index:12}
.fh265-card .fh265-decoration{
  position:absolute!important;
  display:block;
  object-fit:contain;
  height:auto;
  max-width:none;
  pointer-events:none!important;
  user-select:none;
  -webkit-user-select:none;
  transform-origin:center;
}
.fh265-card .fh265-decoration.fh265-corner{
  top:0;left:0;width:100px;z-index:24;
}
.fh265-card .fh265-decoration.fh265-animated_corner {
  top:0;left:0;width:104px;z-index:25;
}
.fh265-card .fh265-decoration.fh265-animated_corner.screw_corner{
  width:73px;top:9px;left:9px;
  animation:fh265-screw-spin 4s linear infinite;
}
.fh265-card .fh265-decoration.fh265-animated_corner.screw_corner.fh265-right{
  right:9px;left:auto;animation-direction:reverse;
}
.fh265-card .fh265-decoration.fh265-animated_corner.blade_corner{
  top:4px;left:4px;width:105px;animation:fh265-screw-spin 4s linear infinite;
}
.fh265-card .fh265-decoration.fh265-animated_corner.chainsaw_corner{
  width:150px;top:0;left:4px;transform-origin:22% 19%;
  animation:fh265-chainsaw 2.4s ease-in-out infinite alternate;
}
.fh265-card .fh265-decoration.fh265-side {
  right:0;top:calc(var(--fh265-banner-height,170px) + 12px);
  width:clamp(160px,21vw,230px);max-height:min(260px,calc(100% - var(--fh265-banner-height,170px) - 8px));
  object-position:top right;z-index:16;
}
.fh265-card .fh265-decoration.fh265-side.bike_side {width:clamp(165px,23vw,245px)}
.fh265-card .fh265-decoration.fh265-top {
  right:11%;top:0;width:165px;max-height:190px;
  object-position:top center;z-index:20;
}
.fh265-card .fh265-decoration.fh265-top.screwing_head {
  top:25%;right:2%;width:105px;max-height:210px;
  z-index:8;animation:fh265-head-lower 7.5s ease-in-out infinite;
}
.fh265-card .fh265-decoration.fh265-top.heavenly_hands {top:0;right:10%;width:165px}
@keyframes fh265-screw-spin {to {transform:rotate(360deg)}}
@keyframes fh265-chainsaw {from {transform:rotate(-15deg)} to {transform:rotate(15deg)}}
@keyframes fh265-head-lower {
  0%,100% {top:25%}
  50% {top:50%}
}
.fh265-avatar-holder {
  display:inline-flex!important;align-items:center;justify-content:center;
  position:relative!important;isolation:isolate;vertical-align:middle;
  max-width:none; flex:0 0 auto;
}
.fh265-avatar-holder img.avatar {width:100%!important;height:100%!important;object-fit:cover;flex:none;z-index:1;position:relative}
.fh265-avatar-ring {
  position:absolute!important;inset:-7%;height:114%;width:114%;z-index:4;
  object-fit:contain;pointer-events:none;user-select:none;
}
/* Bigger full-profile avatar frames, compact frames everywhere else. */
.fh265-card .fh265-avatar-ring {inset:-9%;height:118%;width:118%}

/* Biscuit Shop 2.6.5: blue, clean, categorized. */
#view-fh81-shop .fh265-shop-intro {
  display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:center;
  border:1px solid var(--line,#2b4264);border-radius:18px;
  background:linear-gradient(120deg,#172d50,#101c32 70%);padding:20px;margin:14px 0 18px;
}
#view-fh81-shop .fh265-shop-intro h2{margin:0 0 5px;font-size:clamp(19px,2.1vw,26px)}
#view-fh81-shop .fh265-shop-intro p{margin:0;color:#b0c6e4;font-size:13px;line-height:1.5}
#view-fh81-shop .fh265-wallet-chip{white-space:nowrap;background:#2d5389;color:#fff;border-radius:12px;padding:12px 16px;font-weight:750}
#view-fh81-shop .fh265-nav {
  position:sticky;top:8px;z-index:19;display:flex;gap:8px;overflow-x:auto;
  max-width:100%;margin-bottom:17px;padding:9px;
  background:var(--panel,#15263e);border:1px solid var(--line,#29466d);border-radius:13px;
  scrollbar-width:thin;
}
#view-fh81-shop .fh265-nav button{white-space:nowrap;flex:none;border-radius:9px;padding:9px 12px}
#view-fh81-shop .fh265-nav button[aria-pressed="true"]{background:#4a80e7!important;color:white!important}
#view-fh81-shop .fh265-group-header{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin:24px 0 12px}
#view-fh81-shop .fh265-group-header h2{font-size:18px;margin:0}
#view-fh81-shop .fh265-group-header small{color:var(--muted,#a7bad4)}
#view-fh81-shop .fh265-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(175px,1fr));gap:14px;margin-bottom:14px}
#view-fh81-shop .fh265-item{position:relative;display:flex;flex-direction:column;min-width:0;
  background:var(--panel,#14243d);border:1px solid var(--line,#314768);border-radius:13px;padding:12px;gap:7px;}
#view-fh81-shop .fh265-item[data-equipped="true"]{border-color:#84aeff;box-shadow:0 0 0 1px #84aeff44}
#view-fh81-shop .fh265-item[data-owned="true"] .fh265-status{color:#a6d3ff}
#view-fh81-shop .fh265-art{height:155px;background:radial-gradient(circle at 45% 42%,#364b69,#0b1525 85%);border-radius:10px;display:flex;align-items:center;justify-content:center;overflow:hidden}
#view-fh81-shop .fh265-art img{max-width:94%;max-height:94%;width:auto;height:auto;object-fit:contain}
#view-fh81-shop .fh265-item h3{margin:4px 0 0;font-size:15px;line-height:1.3}
#view-fh81-shop .fh265-item .fh265-desc{font-size:12px;color:var(--muted,#b0c2df);line-height:1.5;flex:1}
#view-fh81-shop .fh265-price{font-weight:750;font-size:14px;color:#f0d0a5}
#view-fh81-shop .fh265-actions{display:flex;gap:6px;margin-top:3px}
#view-fh81-shop .fh265-actions button{flex:1;min-width:0;padding:9px 7px;font-size:12px}
#view-fh81-shop .fh265-equipped-list{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 20px}
#view-fh81-shop .fh265-equipped-list button{font-size:12px}
#view-fh81-shop .fh265-status{font-size:11px;opacity:.8}
#view-fh81-shop .fh265-shop-intro+.fh265-nav{margin-top:12px}
#view-fh81-shop #fh81-items{display:block!important}
/* Some older patches added category tabs outside of #fh81-items. */
#fh831-shop-tabs,#fh842-shop-tabs,#fh843-shop-tabs,#fh84-tabs{display:none!important}
@media (max-width:700px){
 .fh265-card .fh265-decoration.fh265-corner{width:66px}
 .fh265-card .fh265-decoration.fh265-animated_corner{width:70px}
 .fh265-card .fh265-decoration.fh265-animated_corner.blade_corner{width:75px}
 .fh265-card .fh265-decoration.fh265-animated_corner.screw_corner{width:52px;top:6px;left:6px}
 .fh265-card .fh265-decoration.fh265-animated_corner.screw_corner.fh265-right{left:auto;right:6px}
 .fh265-card .fh265-decoration.fh265-animated_corner.chainsaw_corner{width:105px}
 .fh265-card .fh265-decoration.fh265-side{width:135px;max-height:170px}
 .fh265-card .fh265-decoration.fh265-side.bike_side{width:145px}
 .fh265-card .fh265-decoration.fh265-top{width:100px;max-height:120px}
 .fh265-card .fh265-decoration.fh265-top.screwing_head{width:77px}
 #view-fh81-shop .fh265-shop-intro{grid-template-columns:1fr;padding:15px}
 #view-fh81-shop .fh265-wallet-chip{justify-self:start}
 #view-fh81-shop .fh265-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 #view-fh81-shop .fh265-art{height:122px}
 #view-fh81-shop .fh265-item{padding:9px}
 #view-fh81-shop .fh265-group-header{flex-direction:column;gap:3px}
}
@media(max-width:360px){#view-fh81-shop .fh265-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){
 .fh265-card .fh265-decoration{animation:none!important}
}

#view-fh81-shop .fh265-frame-preview{position:relative}
#view-fh81-shop .fh265-art-avatar{position:absolute;width:56%;height:56%;border-radius:50%;background:linear-gradient(140deg,#709ce0,#253d66);display:flex;align-items:center;justify-content:center;color:#acc4ff;font-size:38px}
#view-fh81-shop .fh265-frame-preview>img{position:absolute;left:10%;top:9%;width:80%;height:82%;max-width:none;max-height:none;object-fit:contain}
#view-fh81-shop .fh265-item[data-item="blade_corner"] .fh265-art img,#view-fh81-shop .fh265-item[data-item="screw_corner"] .fh265-art img{animation:fh265-screw-spin 4s linear infinite}
#view-fh81-shop .fh265-item[data-item="chainsaw_corner"] .fh265-art img{animation:fh265-chainsaw 2.4s ease-in-out infinite alternate}
@media(prefers-reduced-motion:reduce){#view-fh81-shop .fh265-art img{animation:none!important}}

/* FriendHub 2.6.6 — floating profiles and connected widgets */

/* Both the normal profile page and popup use one contiguous card for bio + widgets. */
.fh266-composite {
  position: relative !important;
  isolation: isolate;
  width: 100%;
  min-width: 0;
  overflow: visible !important;
  border-radius: 18px;
}
.fh266-composite > #profile-card,
.fh266-composite > #user-card {
  border-radius: 18px 18px 0 0 !important;
  margin: 0 !important;
  border-bottom: none !important;
  overflow: visible !important;
  box-shadow: none !important;
  position: relative !important;
}
.fh266-composite > .fh266-widgets-panel {
  border-radius: 0 0 18px 18px !important;
  border-top: 1px solid var(--line, #304668) !important;
  margin: 0 !important;
  background: var(--panel, #14243b);
  padding-top: 17px !important;
  box-shadow: none !important;
  position: relative;
  z-index: 1;
  min-width: 0;
}
.fh266-composite > .fh266-widgets-panel h2 { font-size: 17px; margin: 0 0 13px; }
.fh266-composite .profile-board { min-width: 0; }
.fh266-composite .widget { min-width: 0; overflow-wrap: anywhere; }
.fh266-composite .widget img {max-width:100%;height:auto;}
.fh266-composite .widget iframe {max-width:100%;}

/* Move Profile Top artwork above the entire profile, not behind the banner. */
.fh266-composite .fh265-card { isolation: auto !important; }
.fh266-composite .fh265-card > .fh265-decoration.fh265-top {
  z-index: 220 !important;
  position: absolute !important;
  pointer-events: none !important;
  object-fit: contain !important;
  top: -42px !important;
  right: 13% !important;
  left: auto !important;
  width: clamp(110px, 17vw, 185px) !important;
  max-height: none !important;
}
.fh266-composite .fh265-card > .fh265-decoration.fh265-top.heavenly_hands {
  right: 10% !important;
  top: -74px !important;
  width: clamp(115px, 16vw, 174px) !important;
  animation: none !important;
}
.fh266-composite .fh265-card > .fh265-decoration.fh265-top.screwing_head {
  top: -54px !important;
  right: 10% !important;
  width: clamp(80px, 10vw, 112px) !important;
  animation: fh266-screw-descent 8s ease-in-out infinite !important;
}
@keyframes fh266-screw-descent {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(var(--fh266-top-travel, 150px)); }
}
/* Chainsaw pivot touches the top-left edge, instead of floating inward. */
.fh266-composite .fh265-card > .fh265-decoration.fh265-animated_corner.chainsaw_corner {
  top: -15px !important;
  left: -12px !important;
  right: auto !important;
  width: clamp(112px, 16vw, 155px) !important;
  transform-origin: 7% 9% !important;
  z-index: 210 !important;
  animation: fh266-swing-corner 2.4s ease-in-out infinite alternate !important;
}
@keyframes fh266-swing-corner {
  from {transform: rotate(-15deg)}
  to {transform: rotate(15deg)}
}
/* Other corners stay anchored to the unified profile card. */
.fh266-composite .fh265-card > .fh265-decoration.fh265-animated_corner,
.fh266-composite .fh265-card > .fh265-decoration.fh265-corner {
  z-index: 205 !important;
}

/* Discord-inspired profile popup. The page stays underneath it. */
#view-user.fh266-floating {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147482000 !important;
  background: rgba(3, 8, 19, .83) !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(18px, 6vh, 68px) clamp(12px, 4vw, 40px) 42px !important;
  box-sizing: border-box;
  animation: fh266-backdrop-in .18s ease-out;
}
#view-user.fh266-floating[hidden] { display: none !important; }
#view-user.fh266-floating > .fh266-sheet {
  width: min(740px, 100%) !important;
  margin: 0 auto !important;
  position: relative !important;
  z-index: 1;
  border-radius: 20px;
  box-shadow: 0 25px 80px rgba(0,0,0,.65);
  animation: fh266-sheet-in .22s cubic-bezier(.2,.9,.2,1);
}
#view-user .fh266-sheet > .section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin: 0 !important;
  background: var(--panel, #14243b);
  border: 1px solid var(--line, #304668);
  border-bottom: none;
  border-radius: 18px 18px 0 0;
}
#view-user .fh266-sheet > .section-head h1 {
  font-size: 16px !important;
  font-weight: 700;
  margin: 0 !important;
}
#view-user .fh266-sheet > .section-head button {
  padding: 7px 12px;
  min-height: 34px;
  flex: none;
}
#view-user .fh266-sheet .fh266-composite > #user-card {
  border-radius: 0 !important;
}
#view-user .fh266-sheet .fh266-composite > .fh266-widgets-panel {
  border-radius: 0 0 18px 18px !important;
}
#view-user .fh266-sheet .fh266-composite {
  border-radius: 0 0 18px 18px;
}
#view-user .fh266-sheet .banner {
  height: clamp(140px, 22vw, 185px);
}
#view-user .fh266-sheet .profile-board {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}
#view-user .fh266-sheet .profile-board > .widget {grid-column: span 6;}
#view-user .fh266-sheet .profile-board > .widget.w-full {grid-column: span 12;}
#view-user .fh266-sheet .profile-board > .widget.w-half {grid-column: span 6;}
#view-user .fh266-sheet .widget img { width:100%; max-height:340px; object-fit:contain; }
@keyframes fh266-backdrop-in {from {opacity:0} to {opacity:1}}
@keyframes fh266-sheet-in {from {opacity:0;transform:translateY(15px) scale(.985)}to {opacity:1;transform:none}}
body.fh266-profile-open {overflow: hidden !important;}

@media (max-width: 700px) {
  .fh266-composite .fh265-card > .fh265-decoration.fh265-top.heavenly_hands {
    top: -45px !important; right: 7% !important; width: 116px !important;
  }
  .fh266-composite .fh265-card > .fh265-decoration.fh265-top.screwing_head {
    top: -30px !important; right: 8% !important; width: 75px !important;
  }
  .fh266-composite .fh265-card > .fh265-decoration.fh265-animated_corner.chainsaw_corner {
    width: 106px !important; left: -8px !important; top: -9px !important;
  }
  #view-user.fh266-floating { padding: 10px 8px 22px !important; backdrop-filter:none; }
  #view-user .fh266-sheet > .section-head {padding:10px 11px;}
  #view-user .fh266-sheet .profile-board > .widget,
  #view-user .fh266-sheet .profile-board > .widget.w-full,
  #view-user .fh266-sheet .profile-board > .widget.w-half { grid-column: span 12; }
  .fh266-composite > .fh266-widgets-panel { padding: 13px !important; }
  #view-user .fh266-sheet > .section-head h1 {font-size: 15px !important;}
}
@media (prefers-reduced-motion:reduce) {
  #view-user.fh266-floating, #view-user .fh266-sheet {animation:none!important}
  .fh266-composite .fh265-card > .fh265-decoration.fh265-top.screwing_head,
  .fh266-composite .fh265-card > .fh265-decoration.fh265-animated_corner.chainsaw_corner {animation:none!important}
}
