/* ============================================================
   ARIFE unified creation library + 2D stage resize v359
   Additive layer: keeps the existing v358 visual system intact.
   ============================================================ */

/* AI Studio — recent work shelf */
.studio-hub .sh-library-v359{
  margin:0 0 26px;
  padding:20px;
  border:1px solid #27384f;
  border-radius:20px;
  background:
    radial-gradient(circle at 88% 4%,rgba(117,103,255,.14),transparent 31%),
    linear-gradient(145deg,#0f1722,#090e15 72%);
  box-shadow:inset 0 1px rgba(255,255,255,.05),0 18px 48px rgba(0,0,0,.22);
}
.sh-library-head-v359{
  display:flex;
  align-items:center;
  gap:18px;
  margin-bottom:15px;
}
.sh-library-title-v359{min-width:0}
.sh-library-title-v359 small{
  display:block;
  color:#74dcf3;
  font:850 12px/1 ui-monospace,Consolas,monospace;
  letter-spacing:.16em;
}
.sh-library-title-v359 strong{
  display:block;
  margin-top:7px;
  color:#f1f6ff;
  font-size:17px;
  letter-spacing:-.025em;
}
.sh-library-title-v359 p{
  margin:6px 0 0;
  color:#788ba5;
  font-size:11.5px;
  line-height:1.55;
}
.sh-library-actions-v359{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:7px;
}
.sh-library-tabs-v359{display:flex;gap:5px}
.sh-library-tabs-v359 button,
.sh-library-open-v359{
  min-height:34px;
  padding:0 12px;
  border:1px solid #2d415d;
  border-radius:10px;
  background:#0c1420;
  color:#8296b2;
  font:800 12px/1 inherit;
  cursor:pointer;
}
.sh-library-tabs-v359 button.is-active{
  border-color:#5e83c3;
  background:linear-gradient(145deg,#1a2c47,#101929);
  color:#f1f6ff;
  box-shadow:inset 0 1px rgba(255,255,255,.08);
}
.sh-library-open-v359{
  border-color:rgba(118,167,255,.42);
  color:#76a7ff;
}
.sh-library-grid-v359{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:11px;
}
.sh-library-card-v359{
  min-width:0;
  overflow:hidden;
  border:1px solid #24354d;
  border-radius:15px;
  background:#0a111a;
  box-shadow:inset 0 1px rgba(255,255,255,.035);
}
.sh-library-preview-v359{
  position:relative;
  aspect-ratio:16/9;
  overflow:hidden;
  background:
    radial-gradient(circle at 35% 30%,rgba(82,123,190,.28),transparent 34%),
    linear-gradient(145deg,#111e2e,#070b11);
}
.sh-library-preview-v359 img,
.sh-library-preview-v359 video{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}
.sh-library-preview-v359>span{
  position:absolute;
  left:8px;
  top:8px;
  padding:4px 7px;
  border:1px solid rgba(126,175,229,.28);
  border-radius:7px;
  background:rgba(5,10,17,.78);
  color:#b8ddff;
  font:850 11px/1 ui-monospace,Consolas,monospace;
  letter-spacing:.1em;
}
.sh-library-meta-v359{padding:10px 11px 8px}
.sh-library-meta-v359 strong{
  display:-webkit-box;
  min-height:32px;
  overflow:hidden;
  color:#e7eef9;
  font-size:11.5px;
  line-height:1.45;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
}
.sh-library-meta-v359 small{
  display:block;
  margin-top:5px;
  overflow:hidden;
  color:#657993;
  font:700 12px/1.35 ui-monospace,Consolas,monospace;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.sh-library-card-actions-v359{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
  padding:0 9px 10px;
}
.sh-library-card-actions-v359 button{
  min-width:0;
  min-height:32px;
  padding:0 7px;
  border:1px solid #2b3d56;
  border-radius:9px;
  background:#101927;
  color:#9fb1c8;
  font:800 12px/1.2 inherit;
  cursor:pointer;
}
.sh-library-card-actions-v359 button.primary{
  border-color:rgba(118,167,255,.46);
  background:rgba(118,167,255,.08);
  color:#76a7ff;
}
.sh-library-state-v359{
  grid-column:1/-1;
  min-height:128px;
  display:grid;
  place-items:center;
  padding:22px;
  border:1px dashed #2b3b51;
  border-radius:14px;
  text-align:center;
  color:#788aa2;
}
.sh-library-state-v359 strong{display:block;color:#dbe7f6;font-size:13px}
.sh-library-state-v359 small{display:block;margin-top:7px;font-size:12px;line-height:1.55}
.sh-library-state-v359 a,
.sh-library-state-v359 button{
  display:inline-flex;
  align-items:center;
  min-height:34px;
  margin-top:13px;
  padding:0 14px;
  border:1px solid rgba(118,167,255,.45);
  border-radius:10px;
  background:rgba(118,167,255,.08);
  color:#76a7ff;
  font-size:12px;
  font-weight:850;
  text-decoration:none;
  cursor:pointer;
}

/* Cinema — obvious shared-library entrances */
.arife-cinema-library-button-v359,
.arife-library-stage-action-v359{
  width:100%;
  min-height:42px;
  margin:10px 0 4px;
  border:1px solid rgba(107,217,243,.42)!important;
  border-radius:12px!important;
  background:
    radial-gradient(circle at 15% 20%,rgba(106,219,244,.13),transparent 42%),
    linear-gradient(145deg,#122138,#0b1421)!important;
  color:#dff8ff!important;
  font:850 11px/1.25 inherit!important;
  cursor:pointer;
  box-shadow:inset 0 1px rgba(255,255,255,.07),0 8px 20px rgba(0,0,0,.18);
}
.arife-cinema-library-button-v359 span,
.arife-library-stage-action-v359 span{color:#76a7ff}
.arife-library-stage-action-v359{
  margin:0 0 12px;
  padding:10px 12px;
}
.film-asset-remake-v359{
  position:absolute;
  z-index:3;
  right:31px;
  top:7px;
  width:20px;
  height:20px;
  display:none;
  place-items:center;
  border-radius:6px;
  background:#1a232e;
  color:#70ddf5;
  font:900 13px/1 Consolas,monospace;
  font-style:normal;
  cursor:pointer;
}
.film-asset:hover .film-asset-remake-v359{display:grid}
.film-asset-remake-v359:hover{background:#123047;color:#dffaff}
.arife-library-toast-v359{
  position:fixed;
  z-index:15000;
  left:50%;
  bottom:24px;
  max-width:min(520px,calc(100vw - 32px));
  padding:12px 16px;
  border:1px solid #416485;
  border-radius:12px;
  background:rgba(9,17,28,.95);
  color:#dcecff;
  font-size:11px;
  font-weight:750;
  line-height:1.5;
  box-shadow:0 18px 48px rgba(0,0,0,.55);
  transform:translateX(-50%);
}
.arife-studio-rerun-v359{
  margin:0 0 14px;
  padding:12px 14px;
  border:1px solid rgba(118,167,255,.34);
  border-radius:13px;
  background:linear-gradient(145deg,rgba(118,167,255,.08),rgba(75,117,178,.08));
  color:#9fb2c9;
  font-size:11px;
  line-height:1.55;
}
.arife-studio-rerun-v359 strong{color:#eaf5ff}
.arife-studio-rerun-v359 b{color:#76a7ff}

/* Horizontal splitter for production stages 02–10 */
.film-page .arife-pgrip-horizontal-v359{
  position:fixed!important;
  z-index:12410!important;
  display:none;
  min-width:0!important;
  height:22px!important;
  min-height:16px!important;
  background:transparent!important;
  cursor:row-resize!important;
  touch-action:none;
}
.film-page .arife-pgrip-horizontal-v359.is-on{display:block}
.film-page .arife-pgrip-horizontal-v359::before{
  left:0!important;
  top:50%!important;
  right:0!important;
  bottom:auto!important;
  width:auto!important;
  height:1px!important;
  background:linear-gradient(90deg,transparent,rgba(79,117,158,.68) 12%,rgba(79,117,158,.68) 88%,transparent)!important;
  transform:translateY(-50%)!important;
}
.film-page .arife-pgrip-horizontal-v359::after{
  left:50%!important;
  top:50%!important;
  width:64px!important;
  height:20px!important;
  border:1px solid #46688f!important;
  border-radius:8px!important;
  background:
    linear-gradient(145deg,rgba(255,255,255,.12),transparent 32%),
    linear-gradient(90deg,#172b3f,#0a1421)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.1),0 4px 0 rgba(1,4,8,.72),0 10px 24px rgba(0,0,0,.42)!important;
  transform:translate(-50%,-50%)!important;
}
.film-page .arife-pgrip-horizontal-v359>i{
  left:50%!important;
  top:50%!important;
  width:19px!important;
  height:3px!important;
  background:repeating-linear-gradient(90deg,#7da7d1 0 2px,transparent 2px 4px)!important;
  transform:translate(-50%,-50%)!important;
}
.film-page .arife-pgrip-horizontal-v359:hover::after,
.film-page .arife-pgrip-horizontal-v359.is-dragging::after,
.film-page .arife-pgrip-horizontal-v359:focus-visible::after{
  border-color:#70ddf5!important;
  background:
    linear-gradient(145deg,rgba(255,255,255,.14),transparent 32%),
    linear-gradient(90deg,#183d55,#0b2031)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.13),0 4px 0 rgba(1,4,8,.72),0 0 0 3px rgba(112,221,245,.09),0 0 22px rgba(112,221,245,.28)!important;
}
body.arife-pgrip-row-dragging-v359,
body.arife-pgrip-row-dragging-v359 *{
  cursor:row-resize!important;
  user-select:none!important;
  -webkit-user-select:none!important;
}
.film-page .arife-stage-height-v359{
  height:var(--cinema-stage-height-v359)!important;
  min-height:var(--cinema-stage-height-v359)!important;
  max-height:var(--cinema-stage-height-v359)!important;
  overflow:hidden!important;
  align-items:stretch!important;
}
.film-page .arife-stage-height-v359>*{
  min-height:0!important;
  height:100%!important;
  max-height:100%!important;
  overflow:auto!important;
  align-self:stretch!important;
  scrollbar-gutter:stable;
}

@media(max-width:980px){
  .sh-library-head-v359{align-items:flex-start;flex-direction:column}
  .sh-library-actions-v359{width:100%;margin-left:0;justify-content:space-between}
  .sh-library-grid-v359{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:840px){
  .film-page .arife-pgrip-horizontal-v359{display:none!important}
  .film-page .arife-stage-height-v359{
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:visible!important;
  }
  .film-page .arife-stage-height-v359>*{
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
  }
}
@media(max-width:560px){
  .studio-hub .sh-library-v359{padding:15px}
  .sh-library-actions-v359{align-items:stretch;flex-direction:column}
  .sh-library-grid-v359{grid-template-columns:1fr}
}
