/* v12.2.12 — Mobile Stories viewport and creator fixes.
   Scoped to mobile and stories only; no navigation or menu JavaScript changes. */
@media (max-width: 800px) {
  body.hcm948-social-home .hcm948-story-strip {
    display:flex!important;
    flex-wrap:nowrap!important;
    align-items:stretch!important;
    gap:10px!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    padding:8px 10px 12px!important;
    scroll-snap-type:x proximity;
    -webkit-overflow-scrolling:touch;
    box-sizing:border-box!important;
  }
  body.hcm948-social-home .hcm948-story-strip > .hcm948-story {
    flex:0 0 106px!important;
    width:106px!important;
    min-width:106px!important;
    max-width:106px!important;
    min-height:120px!important;
    scroll-snap-align:start;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }
  body.hcm948-social-home .hcm948-story-strip .hcm949-member-story {
    position:relative!important;
    height:120px!important;
    max-height:120px!important;
  }
  body.hcm948-social-home .hcm949-member-story .hcm951-story-preview {
    display:block!important;
    width:100%!important;
    height:100%!important;
    object-fit:cover!important;
  }
  /* Isolate the compact Create Story control from inherited legacy tile dimensions. */
  body.hcm948-social-home .hcm948-story-strip .hcm948-create-story {
    flex:0 0 148px!important;
    width:148px!important;
    min-width:148px!important;
    max-width:148px!important;
    height:62px!important;
    min-height:62px!important;
    max-height:62px!important;
    display:flex!important;
    flex-direction:row!important;
    justify-content:flex-start!important;
    align-items:center!important;
    gap:10px!important;
    padding:10px 12px!important;
    margin:0!important;
    border-radius:12px!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }
  body.hcm948-social-home .hcm948-create-story .hcm948-story-scene {display:none!important;}
  body.hcm948-social-home .hcm948-create-story .hcm948-story-plus {
    position:static!important;
    inset:auto!important;
    transform:none!important;
    flex:0 0 32px!important;
    width:32px!important;
    height:32px!important;
    min-width:32px!important;
    min-height:32px!important;
    border-radius:9px!important;
    display:grid!important;
    place-items:center!important;
    font-size:22px!important;
    line-height:1!important;
    margin:0!important;
  }
  body.hcm948-social-home .hcm948-create-story strong {
    position:static!important;
    inset:auto!important;
    transform:none!important;
    display:block!important;
    flex:1 1 auto!important;
    margin:0!important;
    padding:0!important;
    font-size:13px!important;
    line-height:1.2!important;
    white-space:nowrap!important;
    text-overflow:clip!important;
  }
  /* The viewer fills the visible web-app viewport. It sits above the fixed nav. */
  body .hcm949-viewer:not([hidden]) {
    position:fixed!important;
    inset:0!important;
    width:100vw!important;
    height:100vh!important;
    height:100dvh!important;
    max-height:100dvh!important;
    z-index:2147483000!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:calc(env(safe-area-inset-top, 0px) + 48px) 10px calc(env(safe-area-inset-bottom, 0px) + 110px)!important;
    margin:0!important;
    border:0!important;
    border-radius:0!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
    background:#070e19!important;
  }
  body .hcm949-viewer .hcm949-viewer-image:not([hidden]),
  body .hcm949-viewer .hcm1231-viewer-video:not([hidden]) {
    display:block!important;
    position:relative!important;
    flex:0 1 auto!important;
    width:auto!important;
    max-width:100%!important;
    height:auto!important;
    max-height:100%!important;
    object-fit:contain!important;
    margin:auto!important;
    border-radius:8px!important;
  }
  body .hcm949-viewer .hcm949-close {
    position:absolute!important;
    top:calc(env(safe-area-inset-top, 0px) + 12px)!important;
    right:14px!important;
    z-index:12!important;
    width:42px!important;
    height:42px!important;
    min-width:42px!important;
    min-height:42px!important;
  }
  body .hcm949-viewer .hcm949-progress {
    position:absolute!important;
    top:calc(env(safe-area-inset-top, 0px) + 14px)!important;
    left:14px!important;
    right:70px!important;
    z-index:11!important;
  }
  body .hcm949-viewer .hcm949-viewer-details {
    position:absolute!important;
    left:14px!important;
    right:14px!important;
    bottom:calc(env(safe-area-inset-bottom, 0px) + 66px)!important;
    z-index:11!important;
    display:block!important;
    max-height:68px!important;
    overflow-y:auto!important;
    text-align:center!important;
    margin:0!important;
    padding:4px 8px!important;
    box-sizing:border-box!important;
    pointer-events:auto!important;
  }
  body .hcm949-viewer .hcm949-viewer-details p {
    max-width:100%!important;
    margin:4px 0 0!important;
    font-size:13px!important;
    line-height:1.25!important;
    overflow-wrap:anywhere!important;
  }
  body .hcm949-viewer .hcm1231-viewer-controls {
    position:absolute!important;
    left:50%!important;
    bottom:calc(env(safe-area-inset-bottom, 0px) + 8px)!important;
    transform:translateX(-50%)!important;
    z-index:12!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:12px!important;
    min-width:168px!important;
    height:48px!important;
    padding:4px 7px!important;
    background:rgba(23,36,54,.96)!important;
    border:1px solid rgba(255,255,255,.16)!important;
    border-radius:24px!important;
    box-sizing:border-box!important;
  }
  body .hcm949-viewer .hcm1231-viewer-controls button {
    flex:0 0 38px!important;
    width:38px!important;
    height:38px!important;
    min-height:38px!important;
    min-width:38px!important;
    font-size:24px!important;
    line-height:1!important;
  }
  /* Story uploader stays within viewport with its own scroll; footer remains reachable. */
  body .hcm949-creator:not([hidden]) {
    position:fixed!important;
    inset:0!important;
    width:100vw!important;
    height:100vh!important;
    height:100dvh!important;
    max-height:100dvh!important;
    z-index:2147483000!important;
    display:flex!important;
    justify-content:center!important;
    align-items:center!important;
    padding:calc(env(safe-area-inset-top, 0px) + 12px) 12px calc(env(safe-area-inset-bottom, 0px) + 12px)!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }
  body .hcm949-creator .hcm1231-story-editor {
    position:relative!important;
    width:100%!important;
    max-width:460px!important;
    height:auto!important;
    max-height:100%!important;
    min-height:0!important;
    margin:0!important;
    padding:18px 14px 16px!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
    box-sizing:border-box!important;
  }
  body .hcm949-creator .hcm1231-story-editor h2 {font-size:21px!important;line-height:1.2!important;margin:0 40px 8px 0!important;}
  body .hcm949-creator .hcm1231-story-editor p {font-size:13px!important;line-height:1.35!important;}
  body .hcm949-creator .hcm1231-story-editor form {gap:9px!important;min-width:0!important;}
  body .hcm949-creator .hcm1231-story-editor .hcm1231-add {
    padding:12px!important;
    min-height:44px!important;
    line-height:1.3!important;
    box-sizing:border-box!important;
  }
  body .hcm949-creator .hcm1231-preview-grid {
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    min-width:0!important;
    width:100%!important;
    max-height:26dvh!important;
    overflow-y:auto!important;
  }
  body .hcm949-creator .hcm1231-story-editor [data-hcm1231-submit] {
    min-height:44px!important;
    margin:4px 0 0!important;
  }
  body .hcm949-creator .hcm949-create-close {top:8px!important;right:8px!important;z-index:12!important;}
}
@media (max-width:380px) {
  body .hcm949-creator .hcm1231-preview-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  body .hcm949-viewer .hcm949-viewer-details{bottom:calc(env(safe-area-inset-bottom, 0px) + 62px)!important;}
}
