/* PACKERO V297 — Story editor & viewer, progressive enhancement.
   This sheet loads after all earlier polish sheets. FIT never crops by default.
   Story access, persistence, payment and moderation remain server-controlled. */
body.packero-v3826 .pk-story-steps-v297{
  display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:13px 0 4px;
}
body.packero-v3826 .pk-story-steps-v297>span{
  display:inline-flex;align-items:center;gap:7px;padding:8px 10px;border-radius:999px;
  font-size:12px;font-weight:760;line-height:1.2;color:var(--muted,#817c91);
  background:color-mix(in srgb,var(--panel,#fff) 94%,var(--brand-accent2,#8c42e8));
  border:1px solid var(--line,#ddd3e8);transition:background .16s ease,border-color .16s ease;
}
body.packero-v3826 .pk-story-steps-v297 i{
  display:grid;place-items:center;width:20px;height:20px;border-radius:50%;
  background:color-mix(in srgb,var(--brand-accent2,#9a42ed) 13%,var(--panel,#fff));
  color:inherit;font-size:11px;font-style:normal;
}
body.packero-v3826 .pk-story-steps-v297>span.active{
  color:var(--text,#30273b);border-color:color-mix(in srgb,var(--brand-accent2,#9a42ed) 62%,var(--line));
  background:color-mix(in srgb,var(--brand-accent2,#9a42ed) 14%,var(--panel,#fff));
}
body.packero-v3826 .pk-story-steps-v297>span.done i{
  background:#178a67;color:#fff;
}
body.packero-v3826 .hp-story-create-v382674 .hp-story-create-head-v382674 p{font-size:13px;max-width:64ch;line-height:1.6}
body.packero-v3826 .hp-story-create-v382674 .hp-story-preview-shell-v382674{
  width:100%!important;min-height:0!important;height:auto!important;max-height:none!important;
  border-radius:22px!important;border:1px solid rgba(182,118,226,.36)!important;
  background:radial-gradient(circle at 50% 35%,#29213c,#0c1019 65%)!important;
  box-shadow:0 16px 38px rgba(12,11,26,.19)!important;
}
body.packero-v3826 .hp-story-create-v382674 .hp-story-preview-empty-v3770{min-height:180px!important}
body.packero-v3826 .hp-story-create-v382674 .hp-story-preview-empty-v3770{
  width:100%;min-height:0;align-self:center;padding:18px!important;gap:10px!important;
}
body.packero-v3826 .hp-story-create-v382674 .hp-story-preview-empty-v3770 b{font-size:16px;line-height:1.3;max-width:18ch}
body.packero-v3826 .hp-story-create-v382674 .hp-story-preview-empty-v3770 small{font-size:12px;line-height:1.55;max-width:25ch}
body.packero-v3826 .hp-story-create-v382674 .hp-story-framing-v382626{
  background:color-mix(in srgb,var(--brand-accent2,#9d48e9) 7%,var(--panel,#fff));
  border-radius:18px!important;
}
body.packero-v3826 .hp-story-create-v382674 .hp-story-fit-toggle-v382626 button{
  min-height:48px!important;border-radius:14px!important;display:flex;align-items:center;
  gap:7px;justify-content:center;text-wrap:balance;white-space:normal!important;
  padding:9px 10px!important;line-height:1.25!important;transition:background .15s,border-color .15s;
}
body.packero-v3826 .hp-story-create-v382674 .hp-story-fit-toggle-v382626 button span{font-size:17px}
body.packero-v3826 .hp-story-create-v382674 .hp-story-framing-v382626:not(.is-fill-v297) label:has([data-story-zoom]){display:none!important}
body.packero-v3826 .hp-story-create-v382674 .hp-story-framing-v382626 input[type=range]{accent-color:var(--brand-accent2,#ac40eb)}
body.packero-v3826 .hp-story-create-v382674 .hp-story-editor-media-v382626{touch-action:pan-y}
body.packero-v3826 .hp-story-create-v382674 .hp-story-editor-media-v382626:has([data-story-edit-media][data-fit="fill"]){touch-action:none}
body.packero-v3826 .pk-story-final-v297{
  display:grid;gap:7px!important;max-width:100%;padding:9px 0 3px;
}
body.packero-v3826 .pk-story-final-v297 .pk-story-publish-status-v297{
  color:var(--muted,#867b96);font-size:12px;line-height:1.45;margin:0;
}
body.packero-v3826 .pk-story-final-v297 .pk-story-publish-status-v297[data-kind=ready]{color:#178a67}
body.packero-v3826 .pk-story-final-v297 .pk-story-publish-status-v297[data-kind=error]{color:#dc4c6f}
body.packero-v3826 .pk-story-final-v297 .pk-story-publish-status-v297[data-kind=busy]{color:var(--brand-accent2,#a144dd)}
body.packero-v3826 .pk-story-final-v297>.hp-story-publish-v3770{
  width:100%!important;min-height:52px!important;border-radius:15px!important;
  font-size:15px!important;font-weight:800!important;
}
body.packero-v3826 .pk-story-final-v297>.hp-story-publish-v3770:disabled{
  opacity:.58;box-shadow:none!important;cursor:not-allowed;
}
body.packero-v3826 .pk-story-final-v297>small{font-size:11px;color:var(--muted,#847d91);line-height:1.45}
/* Crop to one portrait canvas at any screen size. Captions and controls stay outside it. */
body.packero-v3826 .pk-story-frame-v298{
  position:relative!important;box-sizing:border-box!important;display:block!important;flex:none!important;
  width:min(100%,37.5dvh,380px)!important;aspect-ratio:9/16!important;
  min-width:0!important;min-height:0!important;height:auto!important;max-height:none!important;
  margin:0 auto!important;border:0!important;overflow:hidden!important;
  border-radius:16px;background:#0e101b!important;
}
body.packero-v3826 .hp-story-create-v382674 [data-story-edit-media],
body.packero-v3826 #veloraModal .pk278-story-view .hp-story-stage .pk-story-frame-v298>.hp-story-user-frame-v382626{
  position:absolute!important;inset:0!important;box-sizing:border-box!important;display:block!important;
  min-width:0!important;min-height:0!important;width:100%!important;height:100%!important;
  max-width:none!important;max-height:none!important;margin:0!important;border:0!important;border-radius:0!important;
}
body.packero-v3826 #veloraModal .pk278-story-view .hp-story-stage:not(.is-repost-v382620){
  box-sizing:border-box!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;
  display:flex!important;flex-direction:column!important;align-items:center!important;overflow:hidden!important;
}
body.packero-v3826 #veloraModal .hp-story-create-v382674 .pk-story-frame-v298>[data-fit=fit],
body.packero-v3826 #veloraModal .pk278-story-view .hp-story-stage .pk-story-frame-v298>.is-user-fit-v382626{
  object-fit:contain!important;object-position:center!important;transform:none!important;
}
body.packero-v3826 #veloraModal .hp-story-create-v382674 .pk-story-frame-v298>[data-fit=fill],
body.packero-v3826 #veloraModal .pk278-story-view .hp-story-stage .pk-story-frame-v298>.is-user-fill-v382626{
  object-fit:cover!important;
  object-position:var(--story-user-x,50%) var(--story-user-y,50%)!important;
  transform-origin:var(--story-user-x,50%) var(--story-user-y,50%)!important;
  transform:scale(var(--story-user-zoom,1))!important;
}
body.packero-v3826 .pk-story-repost-content-v298{min-width:0;width:100%}
body.packero-v3826 .pk-story-frame-v298:focus-visible{outline:3px solid #f2a6ed;outline-offset:-3px}
body.packero-v3826 .hp-story-editor-media-v382626.dragging [data-story-edit-media]{transition:none!important}
body.packero-v3826 [data-story-framing][hidden],
body.packero-v3826 [data-story-camera-panel][hidden]{display:none!important}
body.packero-v3826 .pk-story-video-controls-v298{
  position:relative;z-index:20;box-sizing:border-box;width:min(100%,380px);margin:0 auto;
  display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:6px;padding:6px;
  border-radius:12px;background:#191324;color:#fff;
}
body.packero-v3826 .pk-story-video-controls-v298 button{
  min-height:44px;white-space:nowrap;padding:5px 8px;border-radius:8px;
  background:#362640;color:#fff;border:1px solid #705080;font-size:12px;
}
body.packero-v3826 .pk-story-video-controls-v298 button[aria-pressed=true]{background:#644185}
body.packero-v3826 .pk-story-video-controls-v298 button[hidden]{display:none!important}
body.packero-v3826 #veloraModal .pk278-story-view .hp-story-stage .pk-story-frame-v298>.is-user-fill-v382626:fullscreen,
body.packero-v3826 #veloraModal .hp-story-create-v382674 .pk-story-frame-v298>[data-story-edit-media]:fullscreen{
  object-fit:contain!important;object-position:center!important;transform:none!important;
}
body.packero-v3826 .pk-story-video-controls-v298 input{width:100%;min-width:0;accent-color:#f185d4}
body.packero-v3826 .pk-story-video-controls-v298 p{grid-column:1/-1;margin:0;font-size:12px;color:#ffb8cc}
body.packero-v3826 #veloraModal .pk278-story-view .hp-story-stage .hp-story-seq-nav-v3762{
  top:50%!important;bottom:auto!important;width:44px!important;height:48px!important;
  transform:translateY(-50%)!important;border-radius:14px!important;
}
body.packero-v3826 #veloraModal .pk278-story-view .hp-story-stage .hp-story-seq-nav-v3762::after{
  display:grid!important;opacity:.9;left:5px!important;right:auto!important;
}
body.packero-v3826 #veloraModal .pk278-story-view .hp-story-stage .hp-story-seq-nav-v3762:focus-visible{
  outline:2px solid #f2a6ed!important;outline-offset:-2px!important;
}
html[data-theme=dark] body.packero-v3826 .pk-story-steps-v297>span.active{color:#fbf6ff}
html[data-theme=dark] body.packero-v3826 .pk-story-final-v297 .pk-story-publish-status-v297[data-kind=ready]{color:#80e8b5}
@media(max-width:900px){
  /* Gallery-first interaction: source choices on top, preview directly below.
     display:contents keeps every field inside the same real, submitted form. */
  body.packero-v3826 .hp-story-create-v382674 .hp-story-create-layout-v382674{
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:12px!important;align-items:start!important;
  }
  body.packero-v3826 .hp-story-create-v382674 .hp-story-create-form-v382674{display:contents!important}
  body.packero-v3826 .hp-story-create-v382674 .hp-story-source-grid-v382674{order:0!important}
  body.packero-v3826 .hp-story-create-v382674 .hp-story-preview-shell-v382674{order:1!important}
  body.packero-v3826 .hp-story-create-v382674 .hp-story-framing-v382626{order:2!important}
  body.packero-v3826 .hp-story-create-v382674 .hp-story-create-form-v382674>.field:not(.hp-story-framing-v382626):not(.hp-story-source-grid-v382674){order:3!important}
  body.packero-v3826 .hp-story-create-v382674 .hp-story-camera-panel-v382674{order:1!important}
  body.packero-v3826 .hp-story-create-v382674 .pk-story-final-v297{order:4!important}
  body.packero-v3826 .hp-story-create-v382674 .hp-story-preview-shell-v382674{
    width:min(100%,340px)!important;margin:0 auto!important;
  }
}
@media(max-width:620px){
  body.packero-v3826 #veloraModal .hp-modal-card.hp-story-create-modal-v382674{
    padding:18px 13px max(24px,env(safe-area-inset-bottom))!important;
    overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior:contain;
  }
  body.packero-v3826 .hp-story-create-v382674 .hp-story-create-head-v382674 h2{font-size:24px!important;letter-spacing:-.035em;line-height:1.1}
  body.packero-v3826 .pk-story-steps-v297>span{font-size:11px;padding:6px 8px;gap:5px}
  body.packero-v3826 .pk-story-steps-v297 i{width:18px;height:18px;font-size:10px}
  body.packero-v3826 .hp-story-create-v382674 .hp-story-source-grid-v382674{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.packero-v3826 .hp-story-create-v382674 .hp-story-source-card-v382674{
    min-width:0!important;min-height:90px!important;padding:10px!important;border-radius:16px!important;
    grid-template-columns:1fr!important;grid-template-rows:auto auto auto!important;justify-items:center!important;
    text-align:center!important;gap:3px!important;
  }
  body.packero-v3826 .hp-story-create-v382674 .hp-story-source-icon-v382674{grid-row:auto!important}
  body.packero-v3826 .hp-story-create-v382674 .hp-story-source-card-v382674>b{font-size:12px!important}
  body.packero-v3826 .hp-story-create-v382674 .hp-story-source-card-v382674>small{font-size:10px!important;line-height:1.25!important}
}
@media(prefers-reduced-motion:reduce){
 body.packero-v3826 .pk-story-steps-v297>span,body.packero-v3826 .hp-story-create-v382674 .hp-story-fit-toggle-v382626 button{transition:none!important}
 body.packero-v3826 .hp-story-editor-media-v382626 [data-story-edit-media]{transition:none!important}
}
