/* TeenConnect Cat Luxe v5.1 - desktop polish + mobile-specific vector layout */
.tc-profile-theme-css-v4[data-tc-css-preset="catframe"]{
  position:relative!important;
  overflow:visible!important;
  isolation:isolate!important;
  margin-top:clamp(28px,2.6vw,42px)!important;
  margin-bottom:clamp(30px,2.7vw,44px)!important;
}
.tc-profile-theme-css-v4[data-tc-css-preset="catframe"]>.tc-cat-luxe-layer{
  position:absolute!important;
  inset:clamp(-28px,-2vw,-18px) clamp(-20px,-1.4vw,-12px)!important;
  z-index:7!important;
  display:block!important;
  overflow:visible!important;
  pointer-events:none!important;
  opacity:var(--profile-theme-css-decor-opacity,1)!important;
  filter:drop-shadow(0 10px 18px rgba(116,77,90,.09));
}
.tc-profile-theme-css-v4[data-tc-css-preset="catframe"]>.tc-cat-luxe-layer>i{display:none!important}
.tc-cat-luxe-svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible;display:block}
.tc-cat-luxe-svg *{vector-effect:non-scaling-stroke}

.page-profile .profile-hero.profile-hero-custom.tc-profile-theme-css-v4[data-tc-css-preset="catframe"]{border-radius:24px!important;box-shadow:none!important}
.page-profile .profile-hero.profile-hero-custom.tc-profile-theme-css-v4[data-tc-css-preset="catframe"] .profile-hero-photo{overflow:hidden!important;border-radius:22px!important;inset:0!important}
.page-profile .profile-hero.profile-hero-custom.tc-profile-theme-css-v4[data-tc-css-preset="catframe"] .profile-hero-inner{z-index:12!important}
.page-profile .profile-hero.profile-hero-custom.tc-profile-theme-css-v4[data-tc-css-preset="catframe"]::before{z-index:1!important;border-radius:22px!important}

.tc-cat-luxe-svg .tcv5-frame-glow{animation:tcv51FrameGlow 4.8s ease-in-out infinite}
.tc-cat-luxe-svg .tcv5-ear-left{transform-box:fill-box;transform-origin:72% 100%;animation:tcv51EarL 6.6s ease-in-out infinite}
.tc-cat-luxe-svg .tcv5-ear-right{transform-box:fill-box;transform-origin:28% 100%;animation:tcv51EarR 6.6s ease-in-out infinite}
.tc-cat-luxe-svg .tcv5-tail{transform-box:fill-box;transform-origin:95% 70%;animation:tcv51Tail 5.6s ease-in-out infinite}
.tc-cat-luxe-svg .tcv5-star{transform-box:fill-box;transform-origin:center;animation:tcv51Twinkle 2.8s ease-in-out infinite}
.tc-cat-luxe-svg .tcv5-star.d2{animation-delay:-.8s}.tc-cat-luxe-svg .tcv5-star.d3{animation-delay:-1.6s}.tc-cat-luxe-svg .tcv5-star.d4{animation-delay:-2.2s}
.tc-cat-luxe-svg .tcv5-petal{transform-box:fill-box;transform-origin:center;animation:tcv51Float 5.8s ease-in-out infinite}
.tc-cat-luxe-svg .tcv5-petal.d2{animation-delay:-1.5s}.tc-cat-luxe-svg .tcv5-petal.d3{animation-delay:-3s}

@keyframes tcv51FrameGlow{0%,100%{opacity:.88}50%{opacity:1}}
@keyframes tcv51EarL{0%,88%,100%{transform:rotate(0deg)}92%{transform:rotate(-4deg)}96%{transform:rotate(1deg)}}
@keyframes tcv51EarR{0%,88%,100%{transform:rotate(0deg)}92%{transform:rotate(4deg)}96%{transform:rotate(-1deg)}}
@keyframes tcv51Tail{0%,100%{transform:rotate(0deg)}50%{transform:rotate(-2.1deg)}}
@keyframes tcv51Twinkle{0%,100%{opacity:.38;transform:scale(.74)}50%{opacity:1;transform:scale(1.12)}}
@keyframes tcv51Float{0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(-4px) rotate(8deg)}}

.tc-profile-theme-css-v4[data-tc-css-preset="catframe"][data-tc-css-ears="0"] .tcv5-ears{display:none!important}
.tc-profile-theme-css-v4[data-tc-css-preset="catframe"][data-tc-css-paws="0"] .tcv5-paws,
.tc-profile-theme-css-v4[data-tc-css-preset="catframe"][data-tc-css-paws="0"] .tcv5-tail-wrap{display:none!important}
.tc-profile-theme-css-v4[data-tc-css-preset="catframe"][data-tc-css-sparkles="0"] .tcv5-sparkles{display:none!important}

.tc-profile-theme-css-v4[data-tc-css-preset="catframe"] .profile-theme-skin-img,
.tc-profile-theme-css-v4[data-tc-css-preset="catframe"] .profile-theme-skin,
.tc-profile-theme-css-v4[data-tc-css-preset="catframe"] .tc-theme-anchor-portal-v2,
.tc-profile-theme-css-v4[data-tc-css-preset="catframe"] .tc-profile-theme-portal-v11,
.tc-profile-theme-css-v4[data-tc-css-preset="catframe"] .tc-profile-theme-outer{display:none!important}

@media(max-width:720px){
  .tc-profile-theme-css-v4[data-tc-css-preset="catframe"]{margin-top:18px!important;margin-bottom:24px!important}
  .tc-profile-theme-css-v4[data-tc-css-preset="catframe"]>.tc-cat-luxe-layer{inset:-14px -8px -18px!important}
  .page-profile .profile-hero.profile-hero-custom.tc-profile-theme-css-v4[data-tc-css-preset="catframe"]{border-radius:20px!important}
  .page-profile .profile-hero.profile-hero-custom.tc-profile-theme-css-v4[data-tc-css-preset="catframe"] .profile-hero-photo,
  .page-profile .profile-hero.profile-hero-custom.tc-profile-theme-css-v4[data-tc-css-preset="catframe"]::before{border-radius:18px!important}
}
@media(max-width:420px){
  .tc-profile-theme-css-v4[data-tc-css-preset="catframe"]>.tc-cat-luxe-layer{inset:-12px -7px -16px!important}
  .tc-cat-luxe-svg .tcv5-fine-detail{display:none}
}
@media(prefers-reduced-motion:reduce){.tc-cat-luxe-svg *{animation:none!important}}

/* =========================================================
   v5.3 recovery: server-rendered artwork + catalog previews
   ========================================================= */
.tc-cat-luxe-svg-desktop{display:block}
.tc-cat-luxe-svg-mobile{display:none}

/* v5.3: background remains full-size but is clipped a few px inside the frame. */
@media(max-width:720px){
  .page-profile .profile-hero.profile-hero-custom.tc-profile-theme-css-v4[data-tc-css-preset="catframe"] .profile-hero-photo{
    inset:0!important;
    width:100%!important;
    height:100%!important;
    clip-path:inset(6px 6px 7px 6px round 15px)!important;
  }
  .page-profile .profile-hero.profile-hero-custom.tc-profile-theme-css-v4[data-tc-css-preset="catframe"].has-profile-banner::before{
    inset:0!important;
    clip-path:inset(6px 6px 7px 6px round 15px)!important;
  }
  .tc-cat-luxe-svg-desktop{display:none!important}
  .tc-cat-luxe-svg-mobile{display:block!important}
}

/* Theme catalog preview: entirely server-rendered, no JS dependency. */
.profile-item-preview.type-theme[data-tc-theme-preset="catframe"]{
  min-height:148px!important;
  padding:0!important;
  overflow:visible!important;
  isolation:isolate;
  border-radius:16px!important;
  background:linear-gradient(135deg,#606a89 0%,#8f7188 48%,#d6a6b1 100%)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.55),0 7px 16px rgba(45,54,100,.08)!important;
}
.profile-item-preview.type-theme[data-tc-theme-preset="catframe"]::after{display:none!important;content:none!important}
.tc-catalog-theme-preview{position:absolute;inset:0;display:block;overflow:visible;border-radius:16px}
.tc-catalog-theme-preview::before{
  content:"";position:absolute;inset:15px 18px;border-radius:12px;
  background:radial-gradient(circle at 72% 38%,rgba(255,238,243,.34),transparent 28%),linear-gradient(135deg,#4b577d,#a0798c 58%,#d9aab5);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.20);
}
.tc-catalog-theme-svg{position:absolute;inset:-3px;width:calc(100% + 6px);height:calc(100% + 6px);overflow:visible;filter:drop-shadow(0 4px 7px rgba(102,72,84,.11))}
.tc-catalog-theme-content{position:absolute;z-index:3;left:20%;right:17%;top:41%;display:flex;align-items:center;gap:7px;color:#fff;text-shadow:0 1px 4px rgba(26,25,55,.34)}
.tc-catalog-theme-avatar{display:grid;flex:0 0 29px;width:29px;height:29px;place-items:center;border:2px solid rgba(255,255,255,.95);border-radius:9px;background:linear-gradient(145deg,#fbfdff,#e8f0ff);color:#3459bd;font-size:8px;font-style:normal;font-weight:950;box-shadow:0 3px 8px rgba(25,34,80,.17)}
.tc-catalog-theme-copy{display:grid;gap:2px;min-width:0}.tc-catalog-theme-copy b{color:#fff!important;font-size:10px!important;line-height:1!important}.tc-catalog-theme-copy small{color:rgba(255,255,255,.92);font-size:7px}
.tc-catalog-theme-level{margin-left:auto;padding:4px 6px;border:1px solid rgba(255,255,255,.48);border-radius:7px;background:rgba(255,255,255,.17);font-size:7px;font-style:normal;font-weight:900;backdrop-filter:blur(3px)}
.tc-catalog-theme-label{position:absolute;z-index:4;right:8px;bottom:7px;padding:4px 7px;border-radius:999px;background:rgba(255,255,255,.92);color:#b66d86;font-size:8px;font-weight:950;box-shadow:0 3px 8px rgba(75,43,70,.10)}
.tc-catalog-theme-spark{transform-box:fill-box;transform-origin:center;animation:tcv51Twinkle 2.8s ease-in-out infinite}.tc-catalog-theme-spark.s2{animation-delay:-1.2s}.tc-catalog-theme-spark.s3{animation-delay:-2s}

/* Frame catalog preview cleanup. */
.profile-item-preview.type-frame{
  min-height:132px!important;
  overflow:hidden!important;
  background:radial-gradient(circle at 50% 50%,#fff 0 24%,#eef3ff 25% 47%,transparent 48%),linear-gradient(135deg,#eef3ff,#e5edff)!important;
}
.profile-item-preview.type-frame::before{content:"";position:absolute;inset:10px;border:1px dashed rgba(82,112,190,.14);border-radius:12px;pointer-events:none}
.profile-item-preview.type-frame .profile-frame-preview-avatar{width:58px!important;height:58px!important;border-radius:18px!important;background:linear-gradient(145deg,#30394f,#202838)!important;font-size:11px!important;box-shadow:0 5px 14px rgba(21,29,65,.17)!important}
.profile-item-preview.type-frame .profile-frame-preview-layer{width:122px!important;height:122px!important;object-fit:contain!important;filter:drop-shadow(0 4px 7px rgba(46,73,145,.13))}

@media(max-width:700px){
  .profile-item-preview.type-theme[data-tc-theme-preset="catframe"]{min-height:138px!important}
  .tc-catalog-theme-content{left:19%;right:15%;top:41%}
  .profile-item-preview.type-frame{min-height:118px!important}
  .profile-item-preview.type-frame .profile-frame-preview-avatar{width:52px!important;height:52px!important;border-radius:16px!important}
  .profile-item-preview.type-frame .profile-frame-preview-layer{width:108px!important;height:108px!important}
}
