/* ================================================================
   ACCOUNT + QUOTA SYSTEM
   ================================================================ */
.account-menu-wrap{position:relative;z-index:1200;direction:rtl}
.account-trigger{
  appearance:none;border:none;cursor:pointer;min-height:36px;direction:rtl;
  transition:background .18s ease,border-color .18s ease,transform .18s ease;
}
.account-trigger:hover{transform:translateY(-1px);background:rgba(255,255,255,.08)}
.account-trigger-emoji{
  width:25px;height:25px;border-radius:8px;display:flex;align-items:center;justify-content:center;
  background:rgba(255,255,255,.07);font-size:15px;flex:0 0 25px
}
.account-trigger-chevron{font-size:9px;color:#86889a;transition:transform .24s cubic-bezier(.2,.8,.2,1)}
.account-menu-wrap.open .account-trigger-chevron{transform:rotate(180deg)}

.account-dropdown{
  --account-shift-x:0px;
  position:absolute;top:calc(100% + 10px);right:0;left:auto;width:330px;max-width:calc(100vw - 24px);
  direction:rtl;text-align:right;
  background:rgba(24,25,37,.98);border:1px solid rgba(255,255,255,.08);border-radius:16px;
  box-shadow:0 22px 70px rgba(0,0,0,.38);padding:8px;opacity:0;visibility:hidden;
  transform:translateX(var(--account-shift-x)) translateY(-9px) scale(.975);transform-origin:top right;
  transition:opacity .2s ease,transform .3s cubic-bezier(.2,.9,.2,1.12),visibility .2s;
  backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);overflow:visible
}
.account-menu-wrap.open .account-dropdown{
  opacity:1;visibility:visible;transform:translateX(var(--account-shift-x)) translateY(0) scale(1)
}
.account-dropdown::before{
  content:"";position:absolute;top:-6px;right:25px;left:auto;width:11px;height:11px;background:#1c1d2a;
  border-right:1px solid rgba(255,255,255,.08);border-top:1px solid rgba(255,255,255,.08);transform:rotate(-45deg)
}

.account-dropdown-guest{padding:16px 14px 12px;text-align:center}
.account-guest-icon{font-size:31px;margin-bottom:5px}
.account-guest-title{font-size:13px;font-weight:800;color:#f0f0f5}
.account-guest-renders{font-size:11px;color:#8f91a4;margin:3px 0 14px}
.account-google-login{
  width:100%;min-height:50px;border:1px solid rgba(255,255,255,.1);border-radius:12px;background:#fff;
  color:#202124;display:flex;align-items:center;justify-content:center;gap:11px;cursor:pointer;font-family:inherit;
  transition:transform .16s ease,box-shadow .16s ease
}
.account-google-login:hover{transform:translateY(-1px);box-shadow:0 8px 22px rgba(0,0,0,.18)}
.account-google-login .google-g{font:800 19px Arial;color:#4285f4}
.account-google-login span:last-child{display:flex;flex-direction:column;text-align:right;line-height:1.25}
.account-google-login strong{font-size:12px}
.account-google-login small{font-size:9.5px;color:#777;margin-top:2px}

.account-menu-head{
  display:flex;align-items:center;gap:10px;padding:11px 10px 12px;border-bottom:1px solid rgba(255,255,255,.065)
}
.account-menu-head-emoji{
  width:40px;height:40px;flex:0 0 40px;border-radius:12px;display:flex;align-items:center;justify-content:center;
  background:linear-gradient(145deg,rgba(102,126,234,.18),rgba(118,75,162,.14));font-size:22px;border:1px solid rgba(255,255,255,.06)
}
.account-menu-head-copy{display:flex;flex:1;min-width:0;flex-direction:column;align-items:flex-start;text-align:right}
.account-menu-head-copy strong{width:100%;font-size:12.5px;color:#f1f1f6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.account-menu-head-copy small{width:100%;font-size:9.5px;color:#85879a;direction:ltr;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}

.account-menu-item{border-bottom:1px solid rgba(255,255,255,.075);padding:5px 0 9px}
.account-menu-item:last-of-type{border-bottom:none}
.account-section-title{display:flex;align-items:center;min-height:29px;padding:2px 10px;color:#d8d9e2;font-size:11px;font-weight:800}
.account-section-title>span{display:flex;align-items:center;gap:8px}
.account-section-title>span i{width:16px;text-align:center;color:#7f89e9}
.account-menu-content{display:block;opacity:1;padding:0 10px 2px}
.account-menu-content>*{min-height:0;overflow:visible}

.account-profile-edit-row{display:flex!important;align-items:center;gap:9px}
.account-profile-emoji{
  width:42px;height:42px;flex:0 0 42px;border-radius:12px;border:1px solid rgba(255,255,255,.08);
  display:flex;align-items:center;justify-content:center;background:rgba(102,126,234,.10);font-size:23px
}
button.account-profile-emoji{cursor:pointer;transition:transform .15s ease,background .15s ease}
button.account-profile-emoji:hover{transform:scale(1.04);background:rgba(102,126,234,.18)}
.account-profile-copy{min-width:0;display:flex;flex:1;flex-direction:column;align-items:flex-start}
.account-profile-copy strong{width:100%;font-size:12px;color:#f1f1f6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.account-profile-copy small{width:100%;font-size:9.5px;color:#85879a;direction:ltr;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}
.account-icon-btn{width:30px;height:30px;border:none;border-radius:9px;background:rgba(255,255,255,.05);color:#999bad;cursor:pointer}
.account-icon-btn:hover{background:rgba(102,126,234,.15);color:#bac2ff}

.emoji-picker{
  display:none;margin-top:9px;padding:9px!important;border-radius:11px;background:rgba(10,11,18,.34);
  border:1px solid rgba(255,255,255,.055)
}
.emoji-picker.open{display:block}
.emoji-picker-title{font-size:9.5px;color:#8e90a2;margin-bottom:7px;text-align:right}
.emoji-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:5px}
.emoji-choice{
  aspect-ratio:1;border:none;border-radius:8px;background:rgba(255,255,255,.045);font-size:18px;cursor:pointer;
  display:flex;align-items:center;justify-content:center;transition:transform .13s ease,background .13s ease,box-shadow .13s ease
}
.emoji-choice:hover{transform:translateY(-1px);background:rgba(102,126,234,.15)}
.emoji-choice.selected{background:rgba(102,126,234,.22);box-shadow:inset 0 0 0 1px rgba(150,164,255,.42)}

.account-stat-row{display:flex!important;align-items:center;justify-content:space-between;gap:10px;padding-top:5px!important;padding-bottom:5px!important;font-size:10px}
.account-stat-row span{color:#848698}
.account-stat-row strong{font-size:10px;color:#d5d6df;font-weight:650;text-align:left}
.account-package-empty{font-size:10.5px;color:#8e90a1;margin-bottom:9px}
.account-package-card{background:rgba(102,126,234,.09);border:1px solid rgba(102,126,234,.17);border-radius:11px;padding:9px 10px!important}
.account-package-card .pkg-main{display:flex;justify-content:space-between;gap:8px;color:#e8e9f2;font-size:11px;font-weight:800}
.account-package-card .pkg-meta{display:flex;justify-content:space-between;gap:8px;color:#9092a5;font-size:9.5px;margin-top:6px}
.account-buy-btn{
  width:100%;height:34px;border:none;border-radius:9px;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;
  font:700 10.5px inherit;cursor:pointer
}
.account-logout-btn{
  width:100%;height:40px;border:none;background:transparent;color:#dc7777;font:700 10.5px inherit;
  display:flex;align-items:center;justify-content:flex-start;gap:8px;cursor:pointer;border-radius:9px;padding:0 11px;
  border-top:1px solid rgba(255,255,255,.055)
}
.account-logout-btn:hover{background:rgba(231,76,60,.08)}

.account-name-card{position:relative!important}
.account-google-identity{
  display:flex;align-items:center;gap:10px;background:rgba(102,126,234,.07);border:1px solid rgba(102,126,234,.12);
  border-radius:12px;padding:9px 11px;margin:0 0 10px
}
.account-google-emoji{
  width:42px;height:42px;border:0;border-radius:11px;background:rgba(102,126,234,.10);font-size:24px;
  display:flex;align-items:center;justify-content:center
}
button.account-google-emoji{cursor:pointer}
.account-google-identity div{display:flex;flex-direction:column;min-width:0;flex:1;align-items:flex-start}
.account-google-identity strong{font-size:11.5px;color:#35364a}
.account-google-identity small{width:100%;font-size:9.5px;color:#8b8d9d;direction:ltr;text-align:right;overflow:hidden;text-overflow:ellipsis}
.setup-emoji-picker{margin:0 0 10px!important;background:rgba(102,126,234,.045)}
.account-name-error{min-height:18px;color:#dc5d5d;font-size:10px;text-align:center;padding-top:5px}
body.night-mode .account-google-identity strong{color:#ececf4}

@media(max-width:560px){
  .account-dropdown{width:min(330px,calc(100vw - 20px))}
}
/* End-of-quota pattern is attached to the viewport, not the whole page. */
.screen-watermark{
  display:flex!important;position:absolute!important;inset:0!important;z-index:90!important;
  align-items:center!important;justify-content:center!important;pointer-events:none!important;
  opacity:0!important;visibility:hidden!important;transition:opacity .28s ease,visibility .28s ease!important;
  overflow:hidden!important
}
.screen-watermark.show{opacity:1!important;visibility:visible!important}
.quota-grid-blur{
  position:absolute;inset:-8%;opacity:.38;filter:blur(.6px);
  background-image:
    repeating-linear-gradient(45deg,transparent 0 26px,rgba(255,255,255,.07) 27px 28px),
    repeating-linear-gradient(-45deg,transparent 0 26px,rgba(255,255,255,.055) 27px 28px),
    linear-gradient(115deg,rgba(255,88,162,.18),rgba(89,135,255,.18),rgba(75,227,181,.16),rgba(255,196,77,.17),rgba(171,92,255,.17));
  background-blend-mode:screen,screen,normal;
  transform:rotate(.01deg) scale(1.08)
}
.screen-watermark .watermark-box{
  position:relative!important;z-index:2!important;padding:15px 22px!important;border-radius:14px!important;
  background:rgba(17,18,28,.50)!important;border:1px solid rgba(255,255,255,.10)!important;
  backdrop-filter:blur(10px)!important;-webkit-backdrop-filter:blur(10px)!important;
  box-shadow:0 12px 34px rgba(0,0,0,.15)!important
}
.screen-watermark .watermark-line1{font-size:15px!important;color:rgba(255,255,255,.82)!important;font-weight:800!important}
.screen-watermark .watermark-line2{font-size:9px!important;color:rgba(255,255,255,.40)!important;margin-top:3px!important;letter-spacing:.4px!important}

/* Old blocking warning / screenshot overlay are disabled permanently. */
.render-limit-warning,.screenshot-protection{display:none!important}

/* In account system the status chip is not needed in the trigger. */
#userStatusDisplay{display:none!important}

/* ================================================================
   QUOTA WATERMARK — GRID ONLY
   ================================================================ */
.screen-watermark{
  display:flex!important;
  position:absolute!important;
  inset:0!important;
  z-index:90!important;
  pointer-events:none!important;
  opacity:0!important;
  visibility:hidden!important;
  overflow:hidden!important;
  transition:opacity .24s ease,visibility .24s ease!important;
  background:transparent!important;
}
.screen-watermark.show{opacity:1!important;visibility:visible!important}
.screen-watermark .watermark-box{display:none!important}
.quota-grid-blur{
  position:absolute!important;
  left:50%!important;
  top:50%!important;
  width:145%!important;
  height:145%!important;
  transform:translate(-50%,-50%) rotate(45deg)!important;
  opacity:.58!important;
  filter:none!important;
  background:none!important;
  overflow:hidden!important;
}
.quota-grid-blur::before,
.quota-grid-blur::after{
  content:""!important;
  position:absolute!important;
  inset:0!important;
  background:linear-gradient(90deg,#ff3b7a 0%,#ff8a2b 17%,#ffe44d 33%,#49e27d 50%,#42a5ff 67%,#8d62ff 83%,#ff4fc8 100%)!important;
  -webkit-mask-image:repeating-linear-gradient(90deg,#000 0 1px,transparent 1px 34px)!important;
  mask-image:repeating-linear-gradient(90deg,#000 0 1px,transparent 1px 34px)!important;
  -webkit-mask-repeat:repeat!important;
  mask-repeat:repeat!important;
}
.quota-grid-blur::after{
  transform:rotate(90deg)!important;
  transform-origin:center!important;
}

/* ================================================================
   TEXTURE EDITOR — same preview, half-width inspector
   ================================================================ */
.pro-editor-window{
  width:min(992px,calc(100vw - 28px))!important;
  min-width:760px!important;
}
.pro-editor-main{
  grid-template-columns:minmax(0,75%) minmax(0,25%)!important;
}
.pro-inspector{
  width:100%!important;
  min-width:0!important;
}
.pro-editor-preset-drawer .v4-lib-item img,
.v4-preset-drawer .v4-lib-item img,
.v4-lib-item img{
  aspect-ratio:1/1!important;
  height:auto!important;
  object-fit:cover!important;
}
@media(max-width:900px){
  .pro-editor-window{width:min(900px,calc(100vw - 20px))!important}
  .pro-editor-main{grid-template-columns:minmax(0,72%) minmax(0,28%)!important}
}

/* ================================================================
   ACCOUNT MENU — compact rows, bold readable type
   ================================================================ */
.account-dropdown-user{padding:4px 8px 8px!important}
.account-email-row{
  min-height:42px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  padding:0 10px!important;
  direction:ltr!important;
  text-align:left!important;
  color:#f0f1f7!important;
  font-size:11px!important;
  font-weight:800!important;
  border-bottom:1px solid rgba(255,255,255,.065)!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.account-profile-simple-row{
  min-height:56px!important;
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  padding:7px 10px!important;
  border-bottom:1px solid rgba(255,255,255,.065)!important;
}
.account-profile-name{
  flex:1!important;
  min-width:0!important;
  color:#f2f3f8!important;
  font-size:12px!important;
  font-weight:900!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.account-stat-row span,
.account-stat-row strong,
.account-package-empty,
.account-package-card,
.account-logout-btn,
.emoji-picker-title{
  font-weight:800!important;
}
.account-stat-row span,.account-stat-row strong{font-size:10.5px!important}
.account-logout-btn{font-size:11px!important}
.account-profile-emoji{font-weight:800!important}
.emoji-grid{grid-template-columns:repeat(6,1fr)!important}


/* Keep the expanded account details reachable on shorter screens. */
.account-dropdown{max-height:calc(100dvh - 74px);overflow-y:auto;overscroll-behavior:contain}
